MCPcopy Index your code
hub / github.com/Turing-Project/WriteGPT / update

Method update

RecognizaitonNetwork/crnn/func.py:21–25  ·  view source on GitHub ↗
(self, val, n=1)

Source from the content-addressed store, hash-verified

19 self.count = 0
20
21 def update(self, val, n=1):
22 self.val = val
23 self.sum += val * n
24 self.count += n
25 self.avg = self.sum / self.count
26
27def train(config, train_loader, dataset, converter, model, criterion, optimizer, device, epoch, writer_dict=None, output_dict=None):
28

Callers 3

trainFunction · 0.95
validateFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected