class_docstr: Information retrieval model which encodes query and passage separately
  with two different BERT encoders and computes their similarity score
  as a dot-product between corresponding [CLS] token representations.
class_docstr_tok: ["Information","retrieval","model","which","encodes","query","and","passage","separately","with","two","different","BERT","encoders","and","computes","their","similarity","score","as","a","dot-product","between","corresponding","[","CLS","]","token","representations","."]
code: def __init__(self, cfg: DictConfig, trainer: Trainer = None):
      model_name = cfg.language_model.pretrained_model_name
      self.tokenizer = get_tokenizer(tokenizer_name=model_name)
  
      super().__init__(cfg=cfg, trainer=trainer)
  
      self.q_encoder = self.get_lm_model_with_padded_embedding(cfg)
      self.p_encoder = self.get_lm_model_with_padded_embedding(cfg)
      self.loss = SmoothedCrossEntropyLoss(pad_id=self.tokenizer.pad_id)
  
file_path: NeMo/nemo/collections/nlp/models/information_retrieval/bert_dpr_model.py
imports: from typing import Dict, Optional
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.common.losses import SmoothedCrossEntropyLoss
  from nemo.collections.nlp.data import BertInformationRetrievalDataset
  from nemo.collections.nlp.models.information_retrieval.base_ir_model import BaseIRModel
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.core.classes.common import typecheck
  from nemo.core.neural_types import ChannelType, LogitsType, MaskType, NeuralType
label_desc: Use image node_id 3 to create a new BertDPRModel object from inherited base classes: BaseIRModel with example: obj = BertDPRModel(cfg, trainer)