class_docstr: Poly-encoder model.
  
  See https://arxiv.org/abs/1905.01969 for more details
class_docstr_tok: ["Poly-encoder","model",".","See","https",":","\/\/arxiv.org\/abs\/1905.01969","for","more","details"]
code: def _get_embeddings(self, dict_, null_idx, embedding_size):
      embeddings = torch.nn.Embedding(
          len(dict_), embedding_size, padding_idx=null_idx
      )
      torch.nn.init.normal_(
          embeddings.weight, 0, embedding_size**-0.5
      )
      return embeddings
  
imports: from parlai.core.params import ParlaiParser
  from typing import Any, Dict, Optional, Tuple
  import torch
  from parlai.core.opt import Opt
  from parlai.core.torch_ranker_agent import TorchRankerAgent
  from parlai.core.torch_agent import Batch
  from parlai.utils.misc import recursive_getattr
  from parlai.utils.logging import logging
  from .biencoder import AddLabelFixedCandsTRA
  from .modules import BasicAttention, MultiHeadAttention, TransformerEncoder
  from .transformer import TransformerRankerAgent
label_desc: Use image node_id 3 for calling the PolyEncoderModule obj's underlying member method code with example usage: obj._get_embeddings(dict_, null_idx, embedding_size) and returns: embeddings