MCPcopy Index your code
hub / github.com/pytorch/examples / update

Method update

imagenet/main.py:455–459  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

453 self.count = 0
454
455 def update(self, val, n=1):
456 self.val = val
457 self.sum += val * n
458 self.count += n
459 self.avg = self.sum / self.count
460
461 def all_reduce(self):
462 if self.use_accel:

Callers 11

trainFunction · 0.95
mainFunction · 0.80
run_validateFunction · 0.80
fsdp_mainFunction · 0.80
trainFunction · 0.80
validationFunction · 0.80
_run_batchMethod · 0.80
_set_model_configMethod · 0.80
main.pyFile · 0.80
main.pyFile · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected