class_docstr: The MulCat block.
  
  Args:
      input_size: int, dimension of the input feature.
          The input should have shape (batch, seq_len, input_size).
      hidden_size: int, dimension of the hidden state.
      dropout: float, the dropout rate in the LSTM layer. (Default: 0.0)
      bidirectional: bool, whether the RNN layers are bidirectional. (Default: True)
docstr: Compute output after MulCatBlock.
  
  Args:
      input (torch.Tensor): The input feature.
          Tensor of shape (batch, time, feature_dim)
  
  Returns:
      (torch.Tensor): The output feature after MulCatBlock.
          Tensor of shape (batch, time, feature_dim)
docstr_tok: ["Compute","output","after","MulCatBlock",".","Args",":","input","(","torch.Tensor",")",":","The","input","feature",".","Tensor","of","shape","(","batch",",","time",",","feature_dim",")","Returns",":","(","torch.Tensor",")",":","The","output","feature","after","MulCatBlock",".","Tensor","of","shape","(","batch",",","time",",","feature_dim",")"]
code: def forward(self, input):
      """Compute output after MulCatBlock.
  
      Args:
          input (torch.Tensor): The input feature.
              Tensor of shape (batch, time, feature_dim)
  
      Returns:
          (torch.Tensor): The output feature after MulCatBlock.
              Tensor of shape (batch, time, feature_dim)
      """
      orig_shape = input.shape
      # run rnn module
      rnn_output, _ = self.rnn(input)
      rnn_output = (
          self.rnn_proj(
              rnn_output.contiguous().view(-1, rnn_output.shape[2])
          )
          .view(orig_shape)
          .contiguous()
      )
      # run gate rnn module
      gate_rnn_output, _ = self.gate_rnn(input)
      gate_rnn_output = (
          self.gate_rnn_proj(
              gate_rnn_output.contiguous().view(
                  -1, gate_rnn_output.shape[2]
              )
          )
          .view(orig_shape)
          .contiguous()
      )
      # apply gated rnn
      gated_output = torch.mul(rnn_output, gate_rnn_output)
      # concatenate the input with rnn output
      gated_output = torch.cat([gated_output, input], 2)
      # linear projection to make the output shape the same as input
      gated_output = self.block_projection(
          gated_output.contiguous().view(-1, gated_output.shape[2])
      ).view(orig_shape)
      return gated_output
  
file_path: espnet/espnet2/enh/layers/dpmulcat.py
imports: import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the MulCatBlock obj's underlying member method code with example usage: obj.forward(input) and returns: gated_output