MCPcopy
hub / github.com/facebookresearch/MetaCLIP / update

Method update

src/training/train.py:34–38  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

32 self.count = 0
33
34 def update(self, val, n=1):
35 self.val = val
36 self.sum += val * n
37 self.count += n
38 self.avg = self.sum / self.count
39
40
41def images_to_device(images, device):

Callers 8

train_altogetherFunction · 0.95
train_one_epoch_exFunction · 0.95
kcc_to_featuresFunction · 0.80
download_pretrainedFunction · 0.80
backwardFunction · 0.80
evaluate_exFunction · 0.80
get_datasetFunction · 0.80
get_endsft_datasetFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected