code: def build(self, shape):
      print(self.model)
      print(dir(self.model))
  
      output_shapes = self._infer_torch_output_shapes(self.model, shape)
      print(output_shapes)
  
      # """
      # build graph for pytorch 0.2.0
      # """
      # dummy_input = torch.autograd.Variable(torch.randn(shape))
      # output_node = self.model(dummy_input)
  
      # search_queue = [output_node.grad_fn]
      # tmp_node = PyTorchGraphNode(output_node.grad_fn, 0)
      # self.layer_map[tmp_node.name] = tmp_node
      # visited = {output_node.grad_fn : self.layer_map[tmp_node.name]}
  
      # idx = 0
      # node_count = 1
      # while (idx < len(search_queue)):
      #     current_node = search_queue[idx]
      #     current_type = visited[current_node].type
      #     if hasattr(current_node, 'next_functions'):
      #         for parent, _ in current_node.next_functions:
      #             parent_type = parent.__class__.__name__.replace('Backward', '')
      #             if parent_type != 'AccumulateGrad' and \
      #                (parent_type != 'Transpose' or current_type != 'Addmm'):
      #                 if not parent in visited:
      #                     tmp_node = PyTorchGraphNode(parent, node_count)
      #                     self.layer_map[tmp_node.name] = tmp_node
      #                     node_count += 1
      #                     visited[parent] = tmp_node
      #                     search_queue.append(parent)
      #                 self._make_connection(visited[parent].name, visited[current_node].name)
      #     idx += 1
  
      super(TorchGraph, self).build()
  
file_path: MMdnn/mmdnn/conversion/torch/torch_graph.py
imports: from mmdnn.conversion.common.DataStructure.graph import GraphNode, Graph
  from tensorflow.core.framework.node_def_pb2 import NodeDef
  from tensorflow.core.framework import attr_value_pb2
  import torch
label_desc: Use image node_id 2 for calling the TorchGraph obj's underlying member method code with example usage: obj.build(shape) without return types