MCPcopy Create free account
hub / github.com/XLearning-SCU/2022-CVPR-DART / update

Method update

utils.py:114–118  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

112 self.count = 0
113
114 def update(self, val, n=1):
115 self.val = val
116 self.sum += val * n
117 self.count += n
118 self.avg = self.sum / self.count
119
120def mkdir_if_missing(directory):
121 if not osp.exists(directory):

Callers 1

trainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected