class_docstr: Subclass of TorchAgent that allows for encoding image features.
  
  Provides flags and utility methods.
class_docstr_tok: ["Subclass","of","TorchAgent","that","allows","for","encoding","image","features",".","Provides","flags","and","utility","methods","."]
docstr: Add command-line arguments specifically for this agent.
docstr_tok: ["Add","command-line","arguments","specifically","for","this","agent","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      """
      Add command-line arguments specifically for this agent.
      """
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      agent = parser.add_argument_group("Image args")
      agent.add_argument(
          "--image-features-dim",
          type=int,
          default=2048,
          help="Dimensionality of image features",
      )
      agent.add_argument(
          "--image-encoder-num-layers",
          type=int,
          default=1,
          recommended=1,
          help="Number of linear layers to encode image features with",
      )
      agent.add_argument(
          "--n-image-tokens",
          type=int,
          default=1,
          help=(
              "Number of tokens that the image encoding will consist of. "
              "Specify to spread image encoding over multiple tokens"
          ),
      )
      agent.add_argument(
          "--n-image-channels",
          type=int,
          default=1,
          help=(
              "Number of channels that the image encoding will consist of. "
              "Specify if incoming image is multidimensional"
          ),
      )
      return agent
  
file_path: ParlAI/parlai/core/torch_image_agent.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from abc import abstractmethod
  from typing import List
  import torch
  from parlai.core.message import Message
  from parlai.core.torch_agent import Batch, TorchAgent
label_desc: Use image node_id 1 for calling the TorchImageAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: agent