class_docstr: Supervised Contrastive Replay Model.
  It uses an NCM Classifier during evaluation and a projection network
  during training.
  The input is passed through a feature extractor and then normalized
  before being fed to the classifier.
class_docstr_tok: ["Supervised","Contrastive","Replay","Model",".","It","uses","an","NCM","Classifier","during","evaluation","and","a","projection","network","during","training",".","The","input","is","passed","through","a","feature","extractor","and","then","normalized","before","being","fed","to","the","classifier","."]
docstr: :param feature_extractor: a pytorch module that given the input
      examples extracts the hidden features
  :param projection: a pytorch module that takes as input the output
      of the feature extractor
docstr_tok: [":","param","feature_extractor",":","a","pytorch","module","that","given","the","input","examples","extracts","the","hidden","features",":","param","projection",":","a","pytorch","module","that","takes","as","input","the","output","of","the","feature","extractor"]
code: def __init__(
      self, feature_extractor: nn.Module, projection: nn.Module
  ):
      """
      :param feature_extractor: a pytorch module that given the input
          examples extracts the hidden features
      :param projection: a pytorch module that takes as input the output
          of the feature extractor
      """
      super().__init__()
      self.ncm = NCMClassifier(normalize=False)
      self.feature_extractor = feature_extractor
      self.train_classifier = projection
      self.eval_classifier = self.ncm
  
imports: import torch
  from torch import nn
  from avalanche.models import NCMClassifier
label_desc: Use image node_id 1 to create a new SCRModel object from inherited base classes: nn with example: obj = SCRModel(feature_extractor, projection)