class_docstr: 1D convolution module for custom encoder.
  
  Args:
      idim: Input dimension.
      odim: Output dimension.
      kernel_size: Size of the convolving kernel.
      stride: Stride of the convolution.
      dilation: Spacing between the kernel points.
      groups: Number of blocked connections from input channels to output channels.
      bias: Whether to add a learnable bias to the output.
      batch_norm: Whether to use batch normalization after convolution.
      relu: Whether to use a ReLU activation after convolution.
      dropout_rate: Dropout rate.
docstr: Create new positional embedding vector.
  
  Args:
      pos_embed: Input sequences positional embedding.
                 (B, 2 * (T - 1), D_att)
  
  Return:
      pos_embed: Output sequences positional embedding.
                 (B, 2 * (sub(T) - 1), D_att)
code: def create_new_pos_embed(
      self, pos_embed: torch.Tensor
  ) -> torch.Tensor:
      """Create new positional embedding vector.
  
      Args:
          pos_embed: Input sequences positional embedding.
                     (B, 2 * (T - 1), D_att)
  
      Return:
          pos_embed: Output sequences positional embedding.
                     (B, 2 * (sub(T) - 1), D_att)
  
      """
      pos_embed_positive = pos_embed[:, : pos_embed.size(1) // 2 + 1, :]
      pos_embed_negative = pos_embed[:, pos_embed.size(1) // 2 :, :]
  
      if self.padding != 0:
          pos_embed_positive = pos_embed_positive[:, : -self.padding, :]
          pos_embed_negative = pos_embed_negative[:, : -self.padding, :]
  
      pos_embed_positive = pos_embed_positive[:, :: self.stride, :]
      pos_embed_negative = pos_embed_negative[:, :: self.stride, :]
  
      pos_embed = torch.cat(
          [pos_embed_positive, pos_embed_negative[:, 1:, :]], dim=1
      )
  
      return self.out_pos(pos_embed)
  
file_path: espnet/espnet/nets/pytorch_backend/transducer/conv1d_nets.py
imports: from typing import Optional, Tuple, Union
  import torch
label_desc: Use image node_id 4 for calling the Conv1d obj's underlying member method code with example usage: obj.create_new_pos_embed(pos_embed) and returns: self