class_docstr: CWR* Strategy.
  
  This plugin does not use task identities.
class_docstr_tok: ["CWR","*","Strategy",".","This","plugin","does","not","use","task","identities","."]
docstr: :param model: the model.
  :param cwr_layer_name: name of the last fully connected layer. Defaults
      to None, which means that the plugin will attempt an automatic
      detection.
  :param freeze_remaining_model: If True, the plugin will freeze (set
      layers in eval mode and disable autograd for parameters) all the
      model except the cwr layer. Defaults to True.
docstr_tok: [":","param","model",":","the","model",".",":","param","cwr_layer_name",":","name","of","the","last","fully","connected","layer",".","Defaults","to","None",",","which","means","that","the","plugin","will","attempt","an","automatic","detection",".",":","param","freeze_remaining_model",":","If","True",",","the","plugin","will","freeze","(","set","layers","in","eval","mode","and","disable","autograd","for","parameters",")","all","the","model","except","the","cwr","layer",".","Defaults","to","True","."]
code: def __init__(
      self, model, cwr_layer_name=None, freeze_remaining_model=True
  ):
      """
      :param model: the model.
      :param cwr_layer_name: name of the last fully connected layer. Defaults
          to None, which means that the plugin will attempt an automatic
          detection.
      :param freeze_remaining_model: If True, the plugin will freeze (set
          layers in eval mode and disable autograd for parameters) all the
          model except the cwr layer. Defaults to True.
      """
      super().__init__()
      self.log = logging.getLogger("avalanche")
      self.model = model
      self.cwr_layer_name = cwr_layer_name
      self.freeze_remaining_model = freeze_remaining_model
  
      # Model setup
      self.model.saved_weights = {}
      self.model.past_j = defaultdict(int)
      self.model.cur_j = defaultdict(int)
  
      # to be updated
      self.cur_class = []
  
file_path: avalanche/avalanche/training/plugins/cwr_star.py
imports: import logging
  from collections import defaultdict
  from typing import Optional
  import numpy
  import torch
  from torch.nn import Linear
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
  from avalanche.training.utils import examples_per_class, get_last_fc_layer, get_layer_by_name, freeze_everything, unfreeze_everything
label_desc: Use image node_id 1 to create a new CWRStarPlugin object from inherited base classes: SupervisedPlugin with example: obj = CWRStarPlugin(model, cwr_layer_name, freeze_remaining_model)