class_docstr: Adds (optionally learned) positional embeddings to the inputs.
class_docstr_tok: ["Adds","(","optionally","learned",")","positional","embeddings","to","the","inputs","."]
docstr: Input has shape `(batch_size, seq_len, emb_dim)`
docstr_tok: ["Input","has","shape","`","(","batch_size",",","seq_len",",","emb_dim",")","`"]
code: def forward(self, x):
      """Input has shape `(batch_size, seq_len, emb_dim)`"""
      return x + self.pos_embedding
  
imports: import copy
  import torch
  import torch.nn
  import torch.nn.functional
  import torchvision.models
  from domainbed.lib import wide_resnet
label_desc: Use image node_id 2 for calling the PositionalEmbedding1D obj's underlying member method code with example usage: obj.forward(x) and returns: unknown