MCPcopy
hub / github.com/facebookresearch/jepa / update

Method update

src/utils/logging.py:79–88  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

77 self.count = 0
78
79 def update(self, val, n=1):
80 self.val = val
81 try:
82 self.max = max(val, self.max)
83 self.min = min(val, self.min)
84 except Exception:
85 pass
86 self.sum += val * n
87 self.count += n
88 self.avg = self.sum / self.count
89
90
91def grad_logger(named_params):

Callers 6

grad_loggerFunction · 0.95
adamw_loggerFunction · 0.95
mainFunction · 0.95
run_one_epochFunction · 0.95
run_one_epochFunction · 0.95
train_stepFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected