class_docstr: TrainEvalModel.
  This module allows to wrap together a common feature extractor and
  two classifiers: one used during training time and another
  used at test time. The classifier is switched depending on the
  `training` state of the module.
class_docstr_tok: ["TrainEvalModel",".","This","module","allows","to","wrap","together","a","common","feature","extractor","and","two","classifiers",":","one","used","during","training","time","and","another","used","at","test","time",".","The","classifier","is","switched","depending","on","the","`","training","`","state","of","the","module","."]
docstr: :param feature_extractor: a differentiable feature extractor
  :param train_classifier: a differentiable classifier used
      during training
  :param eval_classifier: a classifier used during testing.
      Doesn't have to be differentiable.
docstr_tok: [":","param","feature_extractor",":","a","differentiable","feature","extractor",":","param","train_classifier",":","a","differentiable","classifier","used","during","training",":","param","eval_classifier",":","a","classifier","used","during","testing",".","Does","n't","have","to","be","differentiable","."]
code: def __init__(
      self, feature_extractor, train_classifier, eval_classifier
  ):
      """
      :param feature_extractor: a differentiable feature extractor
      :param train_classifier: a differentiable classifier used
          during training
      :param eval_classifier: a classifier used during testing.
          Doesn't have to be differentiable.
      """
      super().__init__()
      self.feature_extractor = feature_extractor
      self.train_classifier = train_classifier
      self.eval_classifier = eval_classifier
  
imports: import torch
  from torch.nn import Module
  from typing import Optional
  from avalanche.benchmarks.utils.flat_data import ConstantSequence
  from avalanche.benchmarks.scenarios import CLExperience
label_desc: Use image node_id 1 to create a new TrainEvalModel object from inherited base classes: torch.nn with example: obj = TrainEvalModel(feature_extractor, train_classifier, eval_classifier)