class_docstr: A helper class for exporting simple greedy-search models via TorchScript.
  
  Models with extra inputs will need to override to include more variables.
docstr: Workaround because we can't use TGM._get_initial_decoder_input() directly.
  
  When we try to call that function, we get a "RuntimeError: Type 'Tuple[int,
  int]' cannot be traced. Only Tensors and (possibly nested) Lists, Dicts, and
  Tuples of Tensors can be traced" error.
docstr_tok: ["Workaround","because","we","ca","n't","use","TGM._get_initial_decoder_input","(",")","directly",".","When","we","try","to","call","that","function",",","we","get","a","``","RuntimeError",":","Type","'Tuple","[","int",",","int","]","'","can","not","be","traced",".","Only","Tensors","and","(","possibly","nested",")","Lists",",","Dicts",",","and","Tuples","of","Tensors","can","be","traced","''","error","."]
code: def _get_initial_decoder_input(self, x: torch.Tensor) -> torch.Tensor:
      """
      Workaround because we can't use TGM._get_initial_decoder_input() directly.
  
      When we try to call that function, we get a "RuntimeError: Type 'Tuple[int,
      int]' cannot be traced. Only Tensors and (possibly nested) Lists, Dicts, and
      Tuples of Tensors can be traced" error.
      """
      bsz = x.size(0)
      return (
          torch.tensor(
              self.initial_decoder_input,
              dtype=torch.long,
              device=self.device,
          )
          .expand(bsz, len(self.initial_decoder_input))
          .to(x.device)
      )
  
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Tuple
  import torch.jit
  from parlai.agents.bart.bart import BartAgent
  from parlai.core.dict import DictionaryAgent
  from parlai.core.torch_agent import TorchAgent
  from parlai.utils.bpe import Gpt2BpeHelper, SubwordBPEHelper
  from parlai.torchscript.tokenizer import ScriptableDictionaryAgent
  from torch import nn
label_desc: Use image node_id 3 for calling the TorchScriptGreedySearch obj's underlying member method code with example usage: obj._get_initial_decoder_input(x) and returns: torch