class_docstr: A decorator around `nn.Module` that allows a module and its ancestors to collect and report metrics, such
  as accuracy, loss, etc.
  
  Each Module can collect arbitrary metrics in its fields. The Module implementors should initialize
  and update the metrics as they see fit. Implementors should define
   * `_reset_module_metrics` that resets the module metrics (e.g. sets a counter to zero)
   * `_module_metrics` that reports a dictionary of metrics for this specific module.
  
  `ModuleWithMetrics` can recursively collect all the metrics from its children and report it
  by invoking `report_metrics()`. Metrics are automatically reset when `train()` or `eval()`
  is invoked.
class_docstr_tok: ["A","decorator","around","`","nn.Module","`","that","allows","a","module","and","its","ancestors","to","collect","and","report","metrics",",","such","as","accuracy",",","loss",",","etc",".","Each","Module","can","collect","arbitrary","metrics","in","its","fields",".","The","Module","implementors","should","initialize","and","update","the","metrics","as","they","see","fit",".","Implementors","should","define","*","`","_reset_module_metrics","`","that","resets","the","module","metrics","(","e.g",".","sets","a","counter","to","zero",")","*","`","_module_metrics","`","that","reports","a","dictionary","of","metrics","for","this","specific","module",".","`","ModuleWithMetrics","`","can","recursively","collect","all","the","metrics","from","its","children","and","report","it","by","invoking","`","report_metrics","(",")","`",".","Metrics","are","automatically","reset","when","`","train","(",")","`","or","`","eval","(",")","`","is","invoked","."]
docstr: Reset any reported metrics. Often called after report_metrics() to reset any counters etc.
docstr_tok: ["Reset","any","reported","metrics",".","Often","called","after","report_metrics","(",")","to","reset","any","counters","etc","."]
code: def reset_metrics(self) -> None:
      """Reset any reported metrics. Often called after report_metrics() to reset any counters etc."""
      self._reset_module_metrics()
      for child_module in self.modules():
          if isinstance(child_module, ModuleWithMetrics):
              child_module._reset_module_metrics()
  
file_path: ptgnn/ptgnn/baseneuralmodel/modulewithmetrics.py
imports: from typing_extensions import final
  from abc import ABC
  from torch import nn
  from typing import Any, Dict
label_desc: Use image node_id 3 for calling the ModuleWithMetrics obj's underlying member method code with example usage: obj.reset_metrics() without return types