Skip to content

Commit cbbcc0f

Browse files
ntajbakhshnv-kkudrynski
authored andcommitted
[ConvNets/EffNetV2/TF2] model resume fixed
1 parent eb35710 commit cbbcc0f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • TensorFlow2/Classification/ConvNets/runtime

TensorFlow2/Classification/ConvNets/runtime/runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ def train(self):
282282

283283
target_img_size = self.params.train_img_size
284284
epochs_per_stage = train_epochs // n_stages
285-
for stage in range(resumed_epoch // epochs_per_stage, n_stages):
285+
resumed_stage = min(resumed_epoch // epochs_per_stage, n_stages-1)
286+
for stage in range(resumed_stage, n_stages):
286287
epoch_st = stage * epochs_per_stage
287288
epoch_end = (epoch_st + epochs_per_stage) if stage < n_stages-1 else train_epochs
288289
epoch_curr = epoch_st if epoch_st >= resumed_epoch else resumed_epoch

0 commit comments

Comments
 (0)