class_docstr: Extension of Transresnet to incorporate dialogue history and multimodality.
docstr: Override to include model-specific args.
docstr_tok: ["Override","to","include","model-specific","args","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      """
      Override to include model-specific args.
      """
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      agent = parser.add_argument_group(
          "TransresnetMultimodal task arguments"
      )
      agent.add_argument(
          "--context-encoder-embedding-type",
          type=str,
          default=None,
          choices=[None, "fasttext_cc"],
          help="Specify if using pretrained embeddings",
      )
      agent.add_argument(
          "--load-context-encoder-from",
          type=str,
          default=None,
          help="Specify if using a pretrained transformer encoder",
      )
      agent.add_argument(
          "--share-encoder",
          type="bool",
          default=False,
          help="Whether to share the text encoder for the "
          "labels and the dialogue history",
      )
      agent.add_argument(
          "--num-layers-multimodal-encoder", type=int, default=1
      )
      agent.add_argument(
          "--multimodal",
          type="bool",
          default=False,
          help="If true, feed a query term into a separate "
          "transformer prior to computing final rank "
          "scores",
      )
      agent.add_argument(
          "--multimodal-combo",
          type=str,
          choices=["concat", "sum"],
          default="sum",
          help="How to combine the encoding for the "
          "multi-modal transformer",
      )
      agent.add_argument(
          "--encode-image",
          type="bool",
          default=True,
          help="Whether to include the image encoding when "
          "retrieving a candidate response",
      )
      agent.add_argument(
          "--encode-dialogue-history",
          type="bool",
          default=True,
          help="Whether to include the dialogue history "
          "encoding when retrieving a candidate response",
      )
      agent.add_argument(
          "--encode-personality",
          type="bool",
          default=True,
          help="Whether to include the personality encoding "
          "when retrieving a candidate response",
      )
      return parser
  
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 1 for calling the TransresnetMultimodalModel obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser