docstr: MulAddAdaptLayer Forward.
  
  Args:
      main: tensor or tuple or list
            activations in the main neural network, which are adapted
            tuple/list may be useful when we want to apply the adaptation
              to both normal and skip connection at once
      enroll: tensor or tuple or list
              embedding extracted from enrollment
              tuple/list may be useful when we want to apply the adaptation
                to both normal and skip connection at once
docstr_tok: ["MulAddAdaptLayer","Forward",".","Args",":","main",":","tensor","or","tuple","or","list","activations","in","the","main","neural","network",",","which","are","adapted","tuple\/list","may","be","useful","when","we","want","to","apply","the","adaptation","to","both","normal","and","skip","connection","at","once","enroll",":","tensor","or","tuple","or","list","embedding","extracted","from","enrollment","tuple\/list","may","be","useful","when","we","want","to","apply","the","adaptation","to","both","normal","and","skip","connection","at","once"]
code: def forward(self, main, enroll):
      """MulAddAdaptLayer Forward.
  
      Args:
          main: tensor or tuple or list
                activations in the main neural network, which are adapted
                tuple/list may be useful when we want to apply the adaptation
                  to both normal and skip connection at once
          enroll: tensor or tuple or list
                  embedding extracted from enrollment
                  tuple/list may be useful when we want to apply the adaptation
                    to both normal and skip connection at once
      """
      assert type(main) is type(enroll)
      orig_type = type(main)
      main, enroll = into_tuple(main), into_tuple(enroll)
      assert len(main) == len(enroll) == self.ninputs, (
          len(main),
          len(enroll),
          self.ninputs,
      )
  
      out = []
      for main0, enroll0 in zip(main, enroll):
          if self.do_addition:
              enroll0_mul, enroll0_add = torch.chunk(enroll0, 2, dim=1)
              out.append(
                  enroll0_mul[:, :, None] * main0
                  + enroll0_add[:, :, None]
              )
          else:
              out.append(enroll0[:, :, None] * main0)
      return into_orig_type(tuple(out), orig_type)
  
file_path: espnet/espnet2/enh/layers/adapt_layers.py
imports: from functools import partial
  import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the MulAddAdaptLayer obj's underlying member method code with example usage: obj.forward(main, enroll) and returns: into_orig_type