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","."]
code: def forward(self, x):
      x = self.feature_extractor(x)
      x = torch.nn.functional.normalize(x, p=2, dim=1)
      if self.training:
          return self.train_classifier(x)
      else:
          return self.eval_classifier(x)
  
imports: import torch
  from torch import nn
  from avalanche.models import NCMClassifier
label_desc: Use image node_id 2 for calling the SCRModel obj's underlying member method code with example usage: obj.forward(x) and returns: self, self