class_docstr: Deep Streaming Linear Discriminant Analysis.
  
  This strategy does not use backpropagation.
  Minibatches are first passed to the pretrained feature extractor.
  The result is processed one element at a time to fit the LDA.
  Original paper:
  "Hayes et. al., Lifelong Machine Learning with Deep Streaming Linear
  Discriminant Analysis, CVPR Workshop, 2020"
  https://openaccess.thecvf.com/content_CVPRW_2020/papers/w15/Hayes_Lifelong_Machine_Learning_With_Deep_Streaming_Linear_Discriminant_Analysis_CVPRW_2020_paper.pdf
class_docstr_tok: ["Deep","Streaming","Linear","Discriminant","Analysis",".","This","strategy","does","not","use","backpropagation",".","Minibatches","are","first","passed","to","the","pretrained","feature","extractor",".","The","result","is","processed","one","element","at","a","time","to","fit","the","LDA",".","Original","paper",":","''","Hayes","et",".","al.",",","Lifelong","Machine","Learning","with","Deep","Streaming","Linear","Discriminant","Analysis",",","CVPR","Workshop",",","2020","''","https",":","\/\/openaccess.thecvf.com\/content_CVPRW_2020\/papers\/w15\/Hayes_Lifelong_Machine_Learning_With_Deep_Streaming_Linear_Discriminant_Analysis_CVPRW_2020_paper.pdf"]
docstr: Training epoch.
  :param kwargs:
  :return:
docstr_tok: ["Training","epoch",".",":","param","kwargs",":",":","return",":"]
code: def training_epoch(self, **kwargs):
      """
      Training epoch.
      :param kwargs:
      :return:
      """
      for _, self.mbatch in enumerate(self.dataloader):
          self._unpack_minibatch()
          self._before_training_iteration(**kwargs)
  
          self.loss = self._make_empty_loss()
  
          # Forward
          self._before_forward(**kwargs)
          # compute output on entire minibatch
          self.mb_output, feats = self.forward(return_features=True)
          self._after_forward(**kwargs)
  
          # Loss & Backward
          self.loss += self.criterion()
  
          # Optimization step
          self._before_update(**kwargs)
          # process one element at a time
          for f, y in zip(feats, self.mb_y):
              self.fit(f.unsqueeze(0), y.unsqueeze(0))
          self._after_update(**kwargs)
  
          self._after_training_iteration(**kwargs)
  
imports: import warnings
  from typing import Callable, Optional, Sequence, Union
  import os
  import torch
  from avalanche.training.plugins import SupervisedPlugin
  from avalanche.training.templates import SupervisedTemplate
  from avalanche.training.plugins.evaluation import EvaluationPlugin, default_evaluator
  from avalanche.models.dynamic_modules import MultiTaskModule
  from avalanche.models import FeatureExtractorBackbone
label_desc: Use image node_id 3 for calling the StreamingLDA obj's underlying member method code with example usage: obj.training_epoch() without return types