class_docstr: Generates model graph for pytorch models in protobuf, this implementation
  is borrowed from pytorch v1.4.0, and fixed following issues:
  https://github.com/pytorch/pytorch/issues/33691
  https://github.com/pytorch/pytorch/issues/33670
class_docstr_tok: ["Generates","model","graph","for","pytorch","models","in","protobuf",",","this","implementation","is","borrowed","from","pytorch","v1.4.0",",","and","fixed","following","issues",":","https",":","\/\/github.com\/pytorch\/pytorch\/issues\/33691","https",":","\/\/github.com\/pytorch\/pytorch\/issues\/33670"]
code: def __init__(self, model, dummy_input, verbose=False):
      super().__init__(model, dummy_input)
  
      from tensorboard.compat.proto.config_pb2 import RunMetadata
      from tensorboard.compat.proto.graph_pb2 import GraphDef
      from tensorboard.compat.proto.step_stats_pb2 import (
          StepStats,
          DeviceStepStats,
      )
      from tensorboard.compat.proto.versions_pb2 import VersionDef
  
      list_of_nodes = self.parse(
          self.trace.graph, self.trace, dummy_input
      )
      if verbose:
          print(self.trace.graph)
      self.stepstats = RunMetadata(
          step_stats=StepStats(
              dev_stats=[DeviceStepStats(device="/device:CPU:0")]
          )
      )
      self.graph_def = GraphDef(
          node=list_of_nodes, versions=VersionDef(producer=22)
      )
  
imports: import logging
  import queue
  import re
  from collections import defaultdict
  from typing import List, Dict
  import torch
  from torch.utils.tensorboard._pytorch_graph import NodePy, NodePyIO, NodePyOP, GraphPy
label_desc: Use image node_id 1 to create a new TorchProtoGraph object from inherited base classes: TorchGraph with example: obj = TorchProtoGraph(model, dummy_input, verbose)