class_docstr: Stats tracker for computing metrics on the fly.
class_docstr_tok: ["Stats","tracker","for","computing","metrics","on","the","fly","."]
docstr: Update the stats by the key value pair.
docstr_tok: ["Update","the","stats","by","the","key","value","pair","."]
code: def update(self, key: str, val: float, batch_size: int) -> None:
      """Update the stats by the key value pair."""
      if key not in self._stats:
          self._stats[key] = AverageMeter()
      self._stats[key].update(val, batch_size)
  
file_path: kornia/kornia/x/utils.py
imports: from dataclasses import dataclass, field
  from enum import Enum
  from typing import Any, Callable, Dict, Tuple
  from kornia.core import Module, Tensor
  from kornia.metrics.average_meter import AverageMeter
label_desc: Use image node_id 3 for calling the StatsTracker obj's underlying member method code with example usage: obj.update(key, val, batch_size) without return types