code: def __init__(self, model, input_shape, clone_model=False) -> None:
      if clone_model:
          model = copy.deepcopy(model)
      collected_nodes = analyzer.analyze(model, input_shape, 1)
      self.layer_stats = []
      for node in collected_nodes:
          self.layer_stats.append(LayerStats(node))
  
      self.name = "Model"
      self.input_shape = input_shape
      self.output_shape = self.layer_stats[-1].output_shape
      self.parameters = sum((l.parameters for l in self.layer_stats))
      self.inference_memory = sum(
          (l.inference_memory for l in self.layer_stats)
      )
      self.MAdd = sum((l.MAdd for l in self.layer_stats))
      self.Flops = sum((l.Flops for l in self.layer_stats))
      self.mread = sum((l.mread for l in self.layer_stats))
      self.mwrite = sum((l.mwrite for l in self.layer_stats))
      self.duration = sum((l.duration for l in self.layer_stats))
  
file_path: tensorwatch/tensorwatch/model_graph/torchstat_utils.py
imports: from .torchstat import analyzer
  import pandas
  import copy
label_desc: Use image node_id 1 to create a new ModelStats object from inherited base classes: LayerStats with example: obj = ModelStats(model, input_shape, clone_model)