MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / Phase

Class Phase

callbacks/phase.py:5–25  ·  view source on GitHub ↗

Model training loop phase. Each model's training loop iteration could be separated into (at least) two phases: training and validation. The instances of this class track metrics and counters, related to the specific phase, and keep the reference to subset of data, used during p

Source from the content-addressed store, hash-verified

3# from permuto_sdf_py.callbacks.scores import *
4
5class Phase:
6 """
7 Model training loop phase.
8
9 Each model's training loop iteration could be separated into (at least) two
10 phases: training and validation. The instances of this class track
11 metrics and counters, related to the specific phase, and keep the reference
12 to subset of data, used during phase.
13 """
14
15 def __init__(self, name, loader, grad):
16 self.name = name
17 self.loader = loader
18 self.grad = grad
19 self.iter_nr = 0
20 self.epoch_nr = 0
21 self.samples_processed_this_epoch = 0
22 # self.scores= Scores()
23 self.loss_acum_per_epoch=0.0
24 self.loss_pos_acum_per_epoch=0.0
25 self.loss_dir_acum_per_epoch=0.0
26

Callers 2

trainFunction · 0.85
trainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected