class_docstr: Conformer module definition.
  
  Args:
      block_size: Input/output size.
      self_att: Self-attention module instance.
      feed_forward: Feed-forward module instance.
      feed_forward_macaron: Feed-forward module instance for macaron network.
      conv_mod: Convolution module instance.
      norm_class: Normalization module class.
      norm_args: Normalization module arguments.
      dropout_rate: Dropout rate.
docstr: Encode input sequences.
  
  Args:
      x: Conformer input sequences. (B, T, D_block)
      pos_enc: Positional embedding sequences. (B, 2 * (T - 1), D_block)
      mask: Source mask. (B, T)
      chunk_mask: Chunk mask. (T_2, T_2)
  
  Returns:
      x: Conformer output sequences. (B, T, D_block)
      mask: Source mask. (B, T)
      pos_enc: Positional embedding sequences. (B, 2 * (T - 1), D_block)
docstr_tok: ["Encode","input","sequences",".","Args",":","x",":","Conformer","input","sequences",".","(","B",",","T",",","D_block",")","pos_enc",":","Positional","embedding","sequences",".","(","B",",","2","*","(","T","-","1",")",",","D_block",")","mask",":","Source","mask",".","(","B",",","T",")","chunk_mask",":","Chunk","mask",".","(","T_2",",","T_2",")","Returns",":","x",":","Conformer","output","sequences",".","(","B",",","T",",","D_block",")","mask",":","Source","mask",".","(","B",",","T",")","pos_enc",":","Positional","embedding","sequences",".","(","B",",","2","*","(","T","-","1",")",",","D_block",")"]
code: def forward(
      self,
      x: torch.Tensor,
      pos_enc: torch.Tensor,
      mask: torch.Tensor,
      chunk_mask: Optional[torch.Tensor] = None,
  ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
      """Encode input sequences.
  
      Args:
          x: Conformer input sequences. (B, T, D_block)
          pos_enc: Positional embedding sequences. (B, 2 * (T - 1), D_block)
          mask: Source mask. (B, T)
          chunk_mask: Chunk mask. (T_2, T_2)
  
      Returns:
          x: Conformer output sequences. (B, T, D_block)
          mask: Source mask. (B, T)
          pos_enc: Positional embedding sequences. (B, 2 * (T - 1), D_block)
  
      """
      residual = x
  
      x = self.norm_macaron(x)
      x = residual + self.feed_forward_scale * self.dropout(
          self.feed_forward_macaron(x)
      )
  
      residual = x
      x = self.norm_self_att(x)
  
      x = residual + self.dropout(
          self.self_att(
              x,
              x,
              x,
              pos_enc,
              mask,
              chunk_mask=chunk_mask,
          )
      )
  
      residual = x
  
      x = self.norm_conv(x)
      x, _ = self.conv_mod(x, mask=mask)
      x = residual + self.dropout(x)
  
      residual = x
  
      x = self.norm_feed_forward(x)
      x = residual + self.feed_forward_scale * self.dropout(
          self.feed_forward(x)
      )
  
      x = self.norm_final(x)
  
      return x, mask, pos_enc
  
imports: from typing import Dict, Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the Conformer obj's underlying member method code with example usage: obj.forward(x, pos_enc, mask, chunk_mask) and returns: x,  mask,  pos_enc