class_docstr: Transformers-based BERT model for embeddings tokens, subtokens and sentences
  
  Args:
      load_path: path to a pretrained BERT pytorch checkpoint
      bert_config_file: path to a BERT configuration file
      truncate: whether to remove zero-paddings from returned data
class_docstr_tok: ["Transformers-based","BERT","model","for","embeddings","tokens",",","subtokens","and","sentences","Args",":","load_path",":","path","to","a","pretrained","BERT","pytorch","checkpoint","bert_config_file",":","path","to","a","BERT","configuration","file","truncate",":","whether","to","remove","zero-paddings","from","returned","data"]
code: def load(self):
      self.model = (
          transformers.BertModel.from_pretrained(
              self.load_path, config=self.config
          )
          .eval()
          .to(self.device)
      )
      self.dim = self.model.config.hidden_size
  
file_path: DeepPavlov/deeppavlov/models/embedders/transformers_embedder.py
imports: from pathlib import Path
  from typing import Union, Tuple, Collection
  import torch
  import transformers
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.serializable import Serializable
label_desc: Use image node_id 3 for calling the TransformersBertEmbedder obj's underlying member method code with example usage: obj.load() without return types