MCPcopy
hub / github.com/showlab/Show-o / update

Method update

training/utils.py:172–176  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

170 self.count = 0
171
172 def update(self, val, n=1):
173 self.val = val
174 self.sum += val * n
175 self.count += n
176 self.avg = self.sum / self.count
177
178from torchvision import transforms
179def image_transform(image, resolution=256, normalize=True):

Callers 2

mainFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected