class_docstr: From Scratch Training Plugin.
  
  This plugin resets the strategy's model weights and optimizer state after
  each experience. It expects the strategy to have a single model and
  optimizer. It can be used with the Naive strategy to produce
  "from-scratch training" baselines.
docstr: Creates a `FromScratchTrainingPlugin` instance.
  
  :param reset_optimizer: if True, the startegy's optimizer state is
      reset after each experience.
docstr_tok: ["Creates","a","`","FromScratchTrainingPlugin","`","instance",".",":","param","reset_optimizer",":","if","True",",","the","startegy","'s","optimizer","state","is","reset","after","each","experience","."]
code: def __init__(self, reset_optimizer: bool = True):
      """
      Creates a `FromScratchTrainingPlugin` instance.
  
      :param reset_optimizer: if True, the startegy's optimizer state is
          reset after each experience.
  
      """
      super().__init__()
      self.reset_optimizer = reset_optimizer
      self.initial_weights: Optional[Dict[str, Tensor]] = None
  
file_path: avalanche/avalanche/training/plugins/from_scratch_training.py
imports: from copy import deepcopy
  from typing import Dict, Optional
  from torch import Tensor
  from avalanche.core import BaseSGDPlugin
  from avalanche.training.templates import BaseSGDTemplate
  from avalanche.models.dynamic_optimizers import reset_optimizer
label_desc: Use image node_id 1 to create a new FromScratchTrainingPlugin object from inherited base classes: BaseSGDPlugin with example: obj = FromScratchTrainingPlugin(reset_optimizer)