MCPcopy Create free account
hub / github.com/Walter0807/MotionBERT / update

Method update

lib/utils/learning.py:19–23  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

17 self.count = 0
18
19 def update(self, val, n=1):
20 self.val = val
21 self.sum += val * n
22 self.count += n
23 self.avg = self.sum / self.count
24
25def accuracy(output, target, topk=(1,)):
26 """Computes the accuracy over the k top predictions for the specified values of k"""

Callers 7

validateFunction · 0.95
train_with_configFunction · 0.95
validateFunction · 0.95
train_with_configFunction · 0.95
train_epochFunction · 0.80
train_epochFunction · 0.80
load_pretrained_weightsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected