class_docstr: Base model class which inherits from nn.Module. Also has a stage flag to
  indicate it's in `train`, `eval`, or `test` stage.
  This is because the built-in train/eval flag in PyTorch can't distinguish eval
  and test, which is required to support some use cases.
class_docstr_tok: ["Base","model","class","which","inherits","from","nn.Module",".","Also","has","a","stage","flag","to","indicate","it","'s","in","`","train","`",",","`","eval","`",",","or","`","test","`","stage",".","This","is","because","the","built-in","train\/eval","flag","in","PyTorch","ca","n't","distinguish","eval","and","test",",","which","is","required","to","support","some","use","cases","."]
docstr: Generate inputs for exported caffe2 model, default behavior is flatten the
  input tuples
code: def arrange_caffe2_model_inputs(self, tensor_dict):
      """
      Generate inputs for exported caffe2 model, default behavior is flatten the
      input tuples
      """
      model_inputs = self.arrange_model_inputs(tensor_dict)
      flat_model_inputs = []
      for model_input in model_inputs:
          if isinstance(model_input, tuple):
              flat_model_inputs.extend(model_input)
          else:
              flat_model_inputs.append(model_input)
      return flat_model_inputs
  
imports: import os
  from typing import Dict, List, Union
  import torch
  import torch.jit
  import torch.nn
  from pytext.common.constants import Stage, TORCH_VERSION
  from pytext.config.component import Component, ComponentType
  from pytext.config.doc_classification import ModelInput
  from pytext.config.field_config import FeatureConfig
  from pytext.config.pytext_config import ConfigBase, ConfigBaseMeta
  from pytext.data import CommonMetadata
  from pytext.data.tensorizers import Tensorizer
  from pytext.models.module import create_module
  from pytext.utils.file_io import PathManager
  from pytext.utils.path import is_absolute_path
  from pytext.utils.precision import maybe_float
  from pytext.utils.usage import log_class_usage
  from .decoders import DecoderBase
  from .embeddings import EmbeddingBase, EmbeddingList
  from .output_layers import OutputLayerBase
  from .representations.representation_base import RepresentationBase
label_desc: Use image node_id 17 for calling the BaseModel obj's underlying member method code with example usage: obj.arrange_caffe2_model_inputs(tensor_dict) and returns: flat_model_inputs