class_docstr: Encodes sequences with learned positional embeddings.
  
  Usage:
  
  >>> import torch
  >>>
  >>> from fairseq2.nn.position_encoder import LearnedPositionEncoder
  >>>
  >>> m = LearnedPositionEncoder(encoding_dim=4, max_seq_len=16)
  >>>
  >>> seqs = torch.ones((3, 4))
  >>>
  >>> m(seqs)
  tensor([[ 1.1135,  0.5548,  0.4293,  2.0112],                               # pos 0
          [ 0.2364,  0.6009,  3.3865, -2.4810],                               # pos 1
          [-0.4746,  0.4544,  0.2761,  0.8828]], grad_fn=<SqueezeBackward1>)  # pos 2
class_docstr_tok: ["Encodes","sequences","with","learned","positional","embeddings",".","Usage",":",">",">",">","import","torch",">",">",">",">",">",">","from","fairseq2.nn.position_encoder","import","LearnedPositionEncoder",">",">",">",">",">",">","m","=","LearnedPositionEncoder","(","encoding_dim=4",",","max_seq_len=16",")",">",">",">",">",">",">","seqs","=","torch.ones","(","(","3",",","4",")",")",">",">",">",">",">",">","m","(","seqs",")","tensor","(","[","[","1.1135",",","0.5548",",","0.4293",",","2.0112","]",",","#","pos","0","[","0.2364",",","0.6009",",","3.3865",",","-2.4810","]",",","#","pos","1","[","-0.4746",",","0.4544",",","0.2761",",","0.8828","]","]",",","grad_fn=","<","SqueezeBackward1",">",")","#","pos","2"]
docstr: Reset the parameters and buffers of the module.
docstr_tok: ["Reset","the","parameters","and","buffers","of","the","module","."]
code: def reset_parameters(self) -> None:
      """Reset the parameters and buffers of the module."""
      nn.init.normal_(self.weight)
  
imports: import math
  from abc import ABC, abstractmethod
  from typing import Optional, final
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn import Module
  from torch.nn.functional import embedding
  from torch.nn.parameter import Parameter
  from fairseq2.nn.incremental_state import IncrementalStateBag
  from fairseq2.nn.padding import PaddingMask
  from fairseq2.typing import META, DataType, Device, finaloverride
label_desc: Use image node_id 2 for calling the LearnedPositionEncoder obj's underlying member method code with example usage: obj.reset_parameters() without return types