class_docstr: MLP adapter for Progressive Neural Networks.
docstr: :param in_features: size of each input sample
  :param out_features_per_column: size of each output sample
  :param num_prev_modules: number of previous modules
  :param activation: activation function (default=ReLU)
docstr_tok: [":","param","in_features",":","size","of","each","input","sample",":","param","out_features_per_column",":","size","of","each","output","sample",":","param","num_prev_modules",":","number","of","previous","modules",":","param","activation",":","activation","function","(","default=ReLU",")"]
code: def __init__(
      self,
      in_features,
      out_features_per_column,
      num_prev_modules,
      activation=F.relu,
  ):
      """
      :param in_features: size of each input sample
      :param out_features_per_column: size of each output sample
      :param num_prev_modules: number of previous modules
      :param activation: activation function (default=ReLU)
      """
      super().__init__()
      self.num_prev_modules = num_prev_modules
      self.activation = activation
  
      if num_prev_modules == 0:
          return  # first adapter is empty
  
      # Eq. 2 - MLP adapter. Not needed for the first task.
      self.V = nn.Linear(
          in_features * num_prev_modules, out_features_per_column
      )
      self.alphas = nn.Parameter(torch.randn(num_prev_modules))
      self.U = nn.Linear(
          out_features_per_column, out_features_per_column
      )
  
imports: import torch
  import torch.nn.functional
  from torch import nn
  from avalanche.benchmarks.utils.flat_data import ConstantSequence
  from avalanche.models import MultiTaskModule
  from avalanche.models import MultiHeadClassifier
  from avalanche.benchmarks.scenarios import CLExperience
label_desc: Use image node_id 1 to create a new MLPAdapter object from inherited base classes: nn with example: obj = MLPAdapter(in_features, out_features_per_column, num_prev_modules, activation)