MCPcopy
hub / github.com/microsoft/Cream / update

Method update

AutoFormerV2/lib/utils.py:78–83  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

76 self.delimiter = delimiter
77
78 def update(self, **kwargs):
79 for k, v in kwargs.items():
80 if isinstance(v, torch.Tensor):
81 v = v.item()
82 assert isinstance(v, (float, int))
83 self.meters[k].update(v)
84
85 def __getattr__(self, attr):
86 if attr in self.meters:

Callers 1

evaluateFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected