class_docstr: ImageSeq2seqModel.
  
  Just TGA that can encode image with encoder.
class_docstr_tok: ["ImageSeq2seqModel",".","Just","TGA","that","can","encode","image","with","encoder","."]
code: def __init__(self, opt: Opt, dictionary: DictionaryAgent):
      super().__init__(opt, dictionary)
      self.encoder = ContextWithImageEncoder(
          opt=opt,
          vocabulary_size=len(dictionary),
          embedding=self.embeddings,
          padding_idx=self.pad_idx,
          image_encoder_num_layers=opt["image_encoder_num_layers"],
          image_features_dim=opt["image_features_dim"],
          fusion=opt["image_fusion_type"],
          n_image_tokens=opt.get("n_image_tokens", 1),
          n_image_channels=opt.get("n_image_channels", 1),
      )
  
imports: from enum import Enum
  from functools import reduce
  from typing import List, Tuple, Optional, Union
  import torch
  import torch.nn
  from parlai.agents.transformer.modules import TransformerGeneratorModel, TransformerEncoder
  from parlai.core.dict import DictionaryAgent
  from parlai.core.opt import Opt
label_desc: Use image node_id 1 to create a new ImageSeq2seqModel object from inherited base classes: TransformerGeneratorModel with example: obj = ImageSeq2seqModel(opt, dictionary)