class_docstr: Encapsulates an existing nn.Module to make it subclass MultiTaskModule,
  the user should still be able to interact with the encapsulated module
  as if it was the module itself.
  
  The only things that change are the following, the classifier from the
  given model will be replaced by a MultiHeadClassifier, and the forward()
  implementation will be overwritten by one that accepts task labels.
  The encapsulated module will then be automatically extended to
  fit new classes during calls to model.adaptation()
docstr: compute the output given the input `x` and task label.
  By default, it considers only tasks seen at training time.
  
  :param x:
  :return: all the possible outputs are returned as a dictionary
      with task IDs as keys and the output of the corresponding
      task as output.
docstr_tok: ["compute","the","output","given","the","input","`","x","`","and","task","label",".","By","default",",","it","considers","only","tasks","seen","at","training","time",".",":","param","x",":",":","return",":","all","the","possible","outputs","are","returned","as","a","dictionary","with","task","IDs","as","keys","and","the","output","of","the","corresponding","task","as","output","."]
code: def forward_all_tasks(self, x: torch.Tensor):
      """compute the output given the input `x` and task label.
      By default, it considers only tasks seen at training time.
  
      :param x:
      :return: all the possible outputs are returned as a dictionary
          with task IDs as keys and the output of the corresponding
          task as output.
      """
      out = self.model(x)
      return getattr(self, self.classifier_name)(
          out.view(out.size(0), -1), task_labels=None
      )
  
file_path: avalanche/avalanche/models/helper_method.py
imports: import torch
  import torch.nn
  from avalanche.models.dynamic_modules import MultiTaskModule, MultiHeadClassifier
label_desc: Use image node_id 3 for calling the MultiTaskDecorator obj's underlying member method code with example usage: obj.forward_all_tasks(x) and returns: getattr