Skip to content

Commit ccd4b37

Browse files
committed
Adjust model checkpointing to effective epochs regime
1 parent b5d5e74 commit ccd4b37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plasma/models/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def load_model_weights(self,model):
124124
print('no previous checkpoint found')
125125
return -1
126126
else:
127-
max_epoch = min(self.conf['training']['num_epochs']-1,max(epochs))
127+
max_epoch = max(epochs)
128128
print('loading from epoch {}'.format(max_epoch))
129129
model.load_weights(self.get_save_path(max_epoch))
130130
return max_epoch
@@ -135,7 +135,7 @@ def get_latest_save_path(self):
135135
print('no previous checkpoint found')
136136
return ''
137137
else:
138-
max_epoch = min(self.conf['training']['num_epochs'],max(epochs))
138+
max_epoch = max(epochs)
139139
print('loading from epoch {}'.format(max_epoch))
140140
return self.get_save_path(max_epoch)
141141

0 commit comments

Comments
 (0)