MCPcopy Create free account
hub / github.com/cure-lab/deep-active-learning / reset

Method reset

utils.py:49–59  ·  view source on GitHub ↗
(self, total_epoch)

Source from the content-addressed store, hash-verified

47 self.reset(total_epoch)
48
49 def reset(self, total_epoch):
50 assert total_epoch > 0
51 self.total_epoch = total_epoch
52 self.current_epoch = 0
53 self.epoch_losses = np.zeros((self.total_epoch, 2),
54 dtype=np.float32) # [epoch, train/val]
55 self.epoch_losses = self.epoch_losses - 1
56
57 self.epoch_accuracy = np.zeros((self.total_epoch, 2),
58 dtype=np.float32) # [epoch, train/val]
59 self.epoch_accuracy = self.epoch_accuracy
60
61 def update(self, idx, train_loss, train_acc, val_loss, val_acc):
62 assert idx >= 0 and idx < self.total_epoch, 'total_epoch : {} , but update with the {} index'.format(

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected