class_docstr: Learned poisitional encoding
class_docstr_tok: ["Learned","poisitional","encoding"]
docstr: Learned positional encoding
  
  Args:
      seq_length: sequence length.
      hidden_dim: hidden (model) dimension
docstr_tok: ["Learned","positional","encoding","Args",":","seq_length",":","sequence","length",".","hidden_dim",":","hidden","(","model",")","dimension"]
code: def __init__(self, seq_length: int, hidden_dim: int) -> None:
      """
      Learned positional encoding
  
      Args:
          seq_length: sequence length.
          hidden_dim: hidden (model) dimension
      """
      super().__init__()
      self._emb = torch.nn.parameter.Parameter(
          torch.empty(1, seq_length, hidden_dim).normal_(std=0.02)
      )  # [1, seq_length, hidden_dim]
      self._seq_len = seq_length
      self._hidden_dim = hidden_dim
  
imports: from functools import partial
  from typing import Callable, Optional
  import torch
  import torch.nn
  from torch import Tensor
  from .layers_utils import MLP, StochasticDepth, WindowMultiHeadAttention
label_desc: Use image node_id 1 to create a new LearnedPosition object from inherited base classes: nn with example: obj = LearnedPosition(seq_length, hidden_dim)