class_docstr: Conv1d module definition.
  
  Args:
      input_size: Input dimension.
      output_size: 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.
      causal: Whether to use causal convolution (set to True if streaming).
      dropout_rate: Dropout rate.
docstr: Create new positional embedding vector.
  
  Args:
      pos_enc: Input sequences positional embedding.
               (B, 2 * (T - 1), D_in)
  
  Returns:
      pos_enc: Output sequences positional embedding.
               (B, 2 * (sub(T) - 1), D_in)
docstr_tok: ["Create","new","positional","embedding","vector",".","Args",":","pos_enc",":","Input","sequences","positional","embedding",".","(","B",",","2","*","(","T","-","1",")",",","D_in",")","Returns",":","pos_enc",":","Output","sequences","positional","embedding",".","(","B",",","2","*","(","sub","(","T",")","-","1",")",",","D_in",")"]
code: def create_new_pos_enc(self, pos_enc: torch.Tensor) -> torch.Tensor:
      """Create new positional embedding vector.
  
      Args:
          pos_enc: Input sequences positional embedding.
                   (B, 2 * (T - 1), D_in)
  
      Returns:
          pos_enc: Output sequences positional embedding.
                   (B, 2 * (sub(T) - 1), D_in)
  
      """
      pos_enc_positive = pos_enc[:, : pos_enc.size(1) // 2 + 1, :]
      pos_enc_negative = pos_enc[:, pos_enc.size(1) // 2 :, :]
  
      if self.padding != 0:
          pos_enc_positive = pos_enc_positive[:, : -self.padding, :]
          pos_enc_negative = pos_enc_negative[:, : -self.padding, :]
  
      pos_enc_positive = pos_enc_positive[:, :: self.stride, :]
      pos_enc_negative = pos_enc_negative[:, :: self.stride, :]
  
      pos_enc = torch.cat(
          [pos_enc_positive, pos_enc_negative[:, 1:, :]], dim=1
      )
  
      return pos_enc
  
file_path: espnet/espnet2/asr_transducer/encoder/blocks/conv1d.py
imports: from typing import Optional, Tuple, Union
  import torch
label_desc: Use image node_id 6 for calling the Conv1d obj's underlying member method code with example usage: obj.create_new_pos_enc(pos_enc) and returns: pos_enc