Skip to content

Commit

Permalink
Fix validate_every_n_steps always running first step
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerBOO committed Jan 12, 2025
1 parent 2bbb40c commit 0456858
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions train_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,7 @@ def remove_model(old_ckpt_name):
# VALIDATION PER STEP
should_validate_step = (
args.validate_every_n_steps is not None
and global_step != 0 # Skip first step
and global_step % args.validate_every_n_steps == 0
)
if validation_steps > 0 and should_validate_step:
Expand Down

0 comments on commit 0456858

Please sign in to comment.