code: def __init__(self, model_file_name, input_shape):
      super(PytorchParser, self).__init__()
      if not os.path.exists(model_file_name):
          print(
              "Pytorch model file [{}] is not found.".format(
                  model_file_name
              )
          )
          assert False
      # test
  
      # cpu: https://github.com/pytorch/pytorch/issues/5286
      try:
          model = torch.load(model_file_name)
      except:
          model = torch.load(model_file_name, map_location="cpu")
  
      self.weight_loaded = True
      self.model = model
      # Build network graph
      self.pytorch_graph = None
  
imports: import os
  import numpy
  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.pytorch.pytorch_graph import PytorchGraph040
  from mmdnn.conversion.pytorch.pytorch_graph import PytorchGraph151
  import torch
  import torchvision
label_desc: Use image node_id 3 to create a new PytorchParser object from inherited base classes: Parser with example: obj = PytorchParser(model_file_name, input_shape)