docstr: TasNet forward with adaptation layers.
  
  Args:
      mixture_w: [M, N, K], M is batch size
      enroll_emb: [M, 2*adapt_enroll_dim] if self.skip_connection
                  [M, adapt_enroll_dim] if not self.skip_connection
  
  Returns:
      est_mask: [M, N, K]
docstr_tok: ["TasNet","forward","with","adaptation","layers",".","Args",":","mixture_w",":","[","M",",","N",",","K","]",",","M","is","batch","size","enroll_emb",":","[","M",",","2","*","adapt_enroll_dim","]","if","self.skip_connection","[","M",",","adapt_enroll_dim","]","if","not","self.skip_connection","Returns",":","est_mask",":","[","M",",","N",",","K","]"]
code: def forward(self, mixture_w, enroll_emb):
      """TasNet forward with adaptation layers.
  
      Args:
          mixture_w: [M, N, K], M is batch size
          enroll_emb: [M, 2*adapt_enroll_dim] if self.skip_connection
                      [M, adapt_enroll_dim] if not self.skip_connection
  
      Returns:
          est_mask: [M, N, K]
      """
      M, N, K = mixture_w.size()
  
      bottleneck = self.network[:2]
      tcns = self.network[2]
      masknet = self.network[3:]
      output = bottleneck(mixture_w)
      skip_conn = 0.0
      for i, block in enumerate(tcns):
          for j, layer in enumerate(block):
              idx = i * len(block) + j
              is_adapt_layer = idx == self.i_adapt_layer
              tcn_out = layer(output)
              if self.skip_connection:
                  residual, skip = tcn_out
                  if is_adapt_layer:
                      residual, skip = self.adapt_layer(
                          (residual, skip),
                          torch.chunk(enroll_emb, 2, dim=1),
                      )
                  skip_conn = skip_conn + skip
              else:
                  residual = tcn_out
                  if is_adapt_layer:
                      residual = self.adapt_layer(residual, enroll_emb)
              output = output + residual
  
      # Use residual output when no skip connection
      if self.skip_connection:
          score = masknet(skip_conn)
      else:
          score = masknet(output)
  
      # [M, self.out_channel, K]
      if self.mask_nonlinear == "softmax":
          est_mask = F.softmax(score, dim=1)
      elif self.mask_nonlinear == "relu":
          est_mask = F.relu(score)
      elif self.mask_nonlinear == "sigmoid":
          est_mask = F.sigmoid(score)
      elif self.mask_nonlinear == "tanh":
          est_mask = F.tanh(score)
      elif self.mask_nonlinear == "linear":
          est_mask = score
      else:
          raise ValueError("Unsupported mask non-linear function")
      return est_mask
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from espnet2.enh.layers.adapt_layers import make_adapt_layer
label_desc: Use image node_id 2 for calling the TemporalConvNetInformed obj's underlying member method code with example usage: obj.forward(mixture_w, enroll_emb) and returns: est_mask