class_docstr: A wrapper around the traced model in Caffe2's protobuf format.
  The exported graph has different inputs/outputs from the original Pytorch
  model, as explained in :class:`Caffe2Tracer`. This class wraps around the
  exported graph to simulate the same interface as the original Pytorch model.
  It also provides functions to save/load models in Caffe2's format.'
  
  Examples:
  ::
      c2_model = Caffe2Tracer(cfg, torch_model, inputs).export_caffe2()
      inputs = [{"image": img_tensor_CHW}]
      outputs = c2_model(inputs)
      orig_outputs = torch_model(inputs)
docstr: An interface that wraps around a Caffe2 model and mimics detectron2's models'
  input/output format. See details about the format at :doc:`/tutorials/models`.
  This is used to compare the outputs of caffe2 model with its original torch model.
  
  Due to the extra conversion between Pytorch/Caffe2, this method is not meant for
  benchmark. Because of the conversion, this method also has dependency
  on detectron2 in order to convert to detectron2's output format.
docstr_tok: ["An","interface","that","wraps","around","a","Caffe2","model","and","mimics","detectron2","'s","models'","input\/output","format",".","See","details","about","the","format","at",":","doc",":","`","\/tutorials\/models","`",".","This","is","used","to","compare","the","outputs","of","caffe2","model","with","its","original","torch","model",".","Due","to","the","extra","conversion","between","Pytorch\/Caffe2",",","this","method","is","not","meant","for","benchmark",".","Because","of","the","conversion",",","this","method","also","has","dependency","on","detectron2","in","order","to","convert","to","detectron2","'s","output","format","."]
code: def __call__(self, inputs):
      """
      An interface that wraps around a Caffe2 model and mimics detectron2's models'
      input/output format. See details about the format at :doc:`/tutorials/models`.
      This is used to compare the outputs of caffe2 model with its original torch model.
  
      Due to the extra conversion between Pytorch/Caffe2, this method is not meant for
      benchmark. Because of the conversion, this method also has dependency
      on detectron2 in order to convert to detectron2's output format.
      """
      if self._predictor is None:
          self._predictor = ProtobufDetectionModel(
              self._predict_net, self._init_net
          )
      return self._predictor(inputs)
  
imports: import copy
  import logging
  import os
  import torch
  from caffe2.proto import caffe2_pb2
  from torch import nn
  from detectron2.config import CfgNode
  from detectron2.utils.file_io import PathManager
  from .caffe2_inference import ProtobufDetectionModel
  from .caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP, convert_batched_inputs_to_c2_format
  from .shared import get_pb_arg_vali, get_pb_arg_vals, save_graph
label_desc: Use image node_id 7 for calling the Caffe2Model obj's underlying member method code with example usage: obj.__call__(inputs) and returns: self