code: def __init__(self, model_file_name, input_shape):
      super(TorchParser, self).__init__()
      if not os.path.exists(model_file_name):
          raise ValueError(
              "Torch7 model file [{}] is not found.".format(
                  model_file_name
              )
          )
      model = load_lua(model_file_name)
      if type(model).__name__ == "hashable_uniq_dict":
          model = model.model
      model.evaluate()
      self.weight_loaded = True
  
      # Build network graph
      self.torch_graph = TorchGraph(model)
      self.torch_graph.build([[1] + list(map(int, input_shape))])
  
imports: import os
  import numpy
  from torch.utils.serialization import load_lua
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
  from mmdnn.conversion.common.utils import *
  from mmdnn.conversion.common.DataStructure.parser import Parser
  from mmdnn.conversion.torch.torch_graph import TorchGraph
label_desc: Use image node_id 2 to create a new TorchParser object from inherited base classes: Parser with example: obj = TorchParser(model_file_name, input_shape)