class_docstr: KNN Memory object that keeps track of the features generated by the SSL model
  during the traing phase and performs nearest neighbours inference during the
  test and validation phases for video classfication.
  
  KNN memory requires that you provide the labels and video indices for the
  dataset used for the SSL training phase.
  
  Args:
      length (int): Size of the KNN memory. Set to be equal to the training dataset size.
      dim (int): Feture dimention generated by the SSL model.
      momentum (float): The rate at which to update the features in memory during the SSL-
          training phase.
      downstream_classes (int): Number of classes in the dataset.
      temperature (float): Temperature scaling to use during the inference phase. Typically,
          set to the same value as the loss temperature used in SSL.
      knn_k (int): Number of nearest neighbours to aggregate metrics over for inference.
      deive (str): Device to store the memory module on.
class_docstr_tok: ["KNN","Memory","object","that","keeps","track","of","the","features","generated","by","the","SSL","model","during","the","traing","phase","and","performs","nearest","neighbours","inference","during","the","test","and","validation","phases","for","video","classfication",".","KNN","memory","requires","that","you","provide","the","labels","and","video","indices","for","the","dataset","used","for","the","SSL","training","phase",".","Args",":","length","(","int",")",":","Size","of","the","KNN","memory",".","Set","to","be","equal","to","the","training","dataset","size",".","dim","(","int",")",":","Feture","dimention","generated","by","the","SSL","model",".","momentum","(","float",")",":","The","rate","at","which","to","update","the","features","in","memory","during","the","SSL-","training","phase",".","downstream_classes","(","int",")",":","Number","of","classes","in","the","dataset",".","temperature","(","float",")",":","Temperature","scaling","to","use","during","the","inference","phase",".","Typically",",","set","to","the","same","value","as","the","loss","temperature","used","in","SSL",".","knn_k","(","int",")",":","Number","of","nearest","neighbours","to","aggregate","metrics","over","for","inference",".","deive","(","str",")",":","Device","to","store","the","memory","module","on","."]
code: def forward(self, inputs: torch.Tensor) -> None:
      pass
  
imports: import math
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  import pytorchvideo_trainer.module.distributed_utils
  import torch
  import torch.nn
  import torch.nn.functional
  from hydra.utils import instantiate
  from pytorch_lightning.trainer import Trainer
  from pytorchvideo_trainer.module.video_classification import Batch, BatchKey, EnsembleMethod, VideoClassificationModule
label_desc: Use image node_id 6 for calling the KnnMemory obj's underlying member method code with example usage: obj.forward(inputs) without return types