MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / update

Method update

utils/__init__.py:38–41  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

36 self.cnt = 0
37
38 def update(self, val, n=1):
39 self.sum += val * n
40 self.cnt += n
41 self.avg = self.sum / self.cnt
42
43
44def collate_1d(values, pad_idx=0, left_pad=False, shift_right=False, max_len=None, shift_id=1):

Callers 15

overrideMethod · 0.80
__init__Method · 0.80
__init__Method · 0.80
training_tqdm_dictMethod · 0.80
log_metricsMethod · 0.80
process_outputMethod · 0.80
evaluateMethod · 0.80
run_evaluationMethod · 0.80
run_training_batchMethod · 0.80
set_hparamsFunction · 0.80
_init_vocabMethod · 0.80
training_stepMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected