class_docstr: Extension of Transresnet to incorporate dialogue history and multimodality.
code: def _load_text_encoder_state(self):
      try:
          state_file = self.opt.get("load_encoder_from")
          with PathManager.open(state_file, "rb") as f:
              model = torch.load(f)
          states = model["model"]
          self.text_encoder.load_state_dict(states)
      except Exception as e:
          print(
              "WARNING: Cannot load transformer state; please make sure "
              "specified file is a dictionary with the states in `model`. "
              "Additionally, make sure that the appropriate options are "
              "specified. Error: {}".format(e)
          )
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import torch
  from torch import nn
  from parlai.utils.io import PathManager
  from parlai.agents.transformer.modules import TransformerEncoder, create_position_codes, TransformerEncoderLayer
  from projects.personality_captions.transresnet.modules import TransresnetModel, load_fasttext_embeddings
label_desc: Use image node_id 14 for calling the TransresnetMultimodalModel obj's underlying member method code with example usage: obj._load_text_encoder_state() without return types