class_docstr: Model exporter exports a PyTorch model to Caffe2 model using ONNX
  
  Attributes:
      input_names (List[Str]): names of the input variables to model forward
          function, in a flattened way.
          e.g: forward(tokens, dict) where tokens is List[Tensor] and dict is
          a tuple of value and length: (List[Tensor], List[Tensor]) the
          input names should looks like ['token', 'dict_value', 'dict_length']
      dummy_model_input (Tuple[torch.Tensor]): dummy values to define the
          shape of input tensors, should exactly match the shape of the model
          forward function
      vocab_map (Dict[str, List[str]]): dict of input feature names
          to corresponding index_to_string array, e.g:
          ::
  
              {
                  "text": ["<UNK>", "W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8"],
                  "dict": ["<UNK>", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8"]
              }
      output_names (List[Str]): names of output variables
code: def __init__(
      self,
      config,
      input_names,
      dummy_model_input,
      vocab_map,
      output_names,
  ):
      super().__init__(config)
      self.input_names = input_names
      self.output_names = output_names
      self.dummy_model_input = dummy_model_input
      self.vocab_map = vocab_map or {}
      # validate feature vocab
      for name in self.vocab_map:
          if name not in self.input_names:
              raise ValueError(
                  f"{name} is not found in input names {self.input_names}, \
                      there's a mismatch"
              )
      log_class_usage(__class__)
  
imports: import tempfile
  from typing import Callable, Dict, List, Tuple, Union
  import torch
  from caffe2.python import core
  from caffe2.python.onnx.backend_rep import Caffe2Rep
  from pytext.config import ConfigBase
  from pytext.config.component import Component, ComponentType
  from pytext.config.field_config import FeatureConfig
  from pytext.data import CommonMetadata
  from pytext.fields import FieldMeta
  from pytext.utils import onnx
  from pytext.utils.file_io import PathManager
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 3 to create a new ModelExporter object from inherited base classes: Component with example: obj = ModelExporter(config, input_names, dummy_model_input, vocab_map, output_names)