class_docstr: Actual model code for the Transresnet Agent.
docstr: Add command line arguments.
docstr_tok: ["Add","command","line","arguments","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      """
      Add command line arguments.
      """
      Transformer.add_common_cmdline_args(parser)
      agent = parser.add_argument_group("TransresnetModel arguments")
      agent.add_argument(
          "--truncate",
          type=int,
          default=32,
          help="Max amount of tokens allowed in a text sequence",
      )
      agent.add_argument(
          "--image-features-dim",
          type=int,
          default=2048,
          help="dimensionality of image features",
      )
      agent.add_argument(
          "--embedding-type",
          type=str,
          default=None,
          choices=[None, "fasttext_cc"],
          help="Specify if using pretrained embeddings",
      )
      agent.add_argument(
          "--load-encoder-from",
          type=str,
          default=None,
          help="Specify if using a pretrained transformer encoder",
      )
      agent.add_argument(
          "--hidden-dim",
          type=int,
          default=300,
          help="Hidden dimesionality of personality and image encoder",
      )
      agent.add_argument(
          "--num-layers-all",
          type=int,
          default=-1,
          help="If >= 1, number of layers for both the text "
          "and image encoders.",
      )
      agent.add_argument(
          "--num-layers-text-encoder",
          type=int,
          default=1,
          help="Number of layers for the text encoder",
      )
      agent.add_argument(
          "--num-layers-image-encoder",
          type=int,
          default=1,
          help="Number of layers for the image encoder",
      )
      agent.add_argument(
          "--no-cuda",
          dest="no_cuda",
          action="store_true",
          help="If True, perform ops on CPU only",
      )
      agent.add_argument(
          "--learningrate",
          type=float,
          default=0.0005,
          help="learning rate for optimizer",
      )
      agent.add_argument(
          "--additional-layer-dropout",
          type=float,
          default=0.2,
          help="dropout for additional linear layer",
      )
      parser.set_params(
          ffn_size=1200,
          attention_dropout=0.2,
          relu_dropout=0.2,
          n_positions=1000,
      )
      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 torch import optim
  from parlai.agents.transformer.modules import TransformerEncoder
  from parlai.agents.transformer import transformer
  from parlai.utils.io import PathManager
label_desc: Use image node_id 1 for calling the TransresnetModel obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser