class_docstr: MLP adapter for Progressive Neural Networks.
code: def forward(self, x):
      if self.num_prev_modules == 0:
          return 0  # first adapter is empty
  
      assert len(x) == self.num_prev_modules
      assert len(x[0].shape) == 2, (
          "Inputs to MLPAdapter should have two dimensions: "
          "<batch_size, num_features>."
      )
      for i, el in enumerate(x):
          x[i] = self.alphas[i] * el
      x = torch.cat(x, dim=1)
      x = self.U(self.activation(self.V(x)))
      return x
  
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 2 for calling the MLPAdapter obj's underlying member method code with example usage: obj.forward(x) and returns: x, int