class_docstr: Simple nn.Module to create a multi-layer perceptron
  with BatchNorm and ReLU activations.
  
  :param hidden_size: An array indicating the number of neurons in each layer.
  :type hidden_size: int[]
  :param last_activation: Indicates whether to add BatchNorm and ReLU
                          after the last layer.
  :type last_activation: Boolean
class_docstr_tok: ["Simple","nn.Module","to","create","a","multi-layer","perceptron","with","BatchNorm","and","ReLU","activations",".",":","param","hidden_size",":","An","array","indicating","the","number","of","neurons","in","each","layer",".",":","type","hidden_size",":","int","[","]",":","param","last_activation",":","Indicates","whether","to","add","BatchNorm","and","ReLU","after","the","last","layer",".",":","type","last_activation",":","Boolean"]
code: def __init__(self, hidden_size, last_activation=True):
      super(MLP, self).__init__()
      q = []
      for i in range(len(hidden_size) - 1):
          in_dim = hidden_size[i]
          out_dim = hidden_size[i + 1]
          q.append(("Linear_%d" % i, nn.Linear(in_dim, out_dim)))
          if (i < len(hidden_size) - 2) or (
              (i == len(hidden_size) - 2) and (last_activation)
          ):
              q.append(("BatchNorm_%d" % i, nn.BatchNorm1d(out_dim)))
              q.append(("ReLU_%d" % i, nn.ReLU(inplace=True)))
      self.mlp = nn.Sequential(OrderedDict(q))
  
imports: from avalanche.benchmarks.utils import _make_taskaware_classification_dataset
  from avalanche.models.dynamic_modules import MultiTaskModule, DynamicModule
  import torch.nn
  from torch.nn.parallel import DistributedDataParallel
  from collections import OrderedDict
  from avalanche.benchmarks.scenarios import CLExperience
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: nn with example: obj = MLP(hidden_size, last_activation)