class_docstr: The old BaseStrategy (avalanche 0.1.0)
  just a bit of refactoring to remove useless components for testing.
class_docstr_tok: ["The","old","BaseStrategy","(","avalanche","0.1.0",")","just","a","bit","of","refactoring","to","remove","useless","components","for","testing","."]
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 self.dataloader:
          if self._stop_training:
              break
  
          self._unpack_minibatch()
          trigger_plugins(self, "before_training_iteration")
  
          self.optimizer.zero_grad()
          self.loss = 0
  
          # Forward
          trigger_plugins(self, "before_forward")
          self.mb_output = self.forward()
          trigger_plugins(self, "after_forward")
  
          # Loss & Backward
          self.loss += self.criterion()
  
          trigger_plugins(self, "before_backward")
          self.loss.backward()
          trigger_plugins(self, "after_backward")
  
          # Optimization step
          trigger_plugins(self, "before_update")
          self.optimizer.step()
          trigger_plugins(self, "after_update")
          trigger_plugins(self, "after_training_iteration")
  
imports: import copy
  import logging
  import unittest
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from typing import Optional, Sequence, Union
  from torch.nn import Module, CrossEntropyLoss
  from torch.optim import SGD
  from avalanche.benchmarks.scenarios import ClassificationExperience
  from avalanche.benchmarks.utils.data_loader import TaskBalancedDataLoader
  from avalanche.models import DynamicModule, SimpleMLP, MTSimpleMLP
  from avalanche.models.dynamic_optimizers import reset_optimizer
  from avalanche.models.utils import avalanche_forward
  from avalanche.training import Cumulative
  from avalanche.training.plugins.clock import Clock
  from avalanche.training.plugins import EvaluationPlugin
  from avalanche.training.templates import SupervisedTemplate
  from avalanche.training.utils import trigger_plugins
  from tests.unit_tests_utils import get_fast_benchmark
label_desc: Use image node_id 16 for calling the OldBaseStrategy obj's underlying member method code with example usage: obj.training_epoch() without return types