We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb35710 commit cbbcc0fCopy full SHA for cbbcc0f
1 file changed
TensorFlow2/Classification/ConvNets/runtime/runner.py
@@ -282,7 +282,8 @@ def train(self):
282
283
target_img_size = self.params.train_img_size
284
epochs_per_stage = train_epochs // n_stages
285
- for stage in range(resumed_epoch // epochs_per_stage, n_stages):
+ resumed_stage = min(resumed_epoch // epochs_per_stage, n_stages-1)
286
+ for stage in range(resumed_stage, n_stages):
287
epoch_st = stage * epochs_per_stage
288
epoch_end = (epoch_st + epochs_per_stage) if stage < n_stages-1 else train_epochs
289
epoch_curr = epoch_st if epoch_st >= resumed_epoch else resumed_epoch
0 commit comments