Fix validate_every_n_steps always running first step

This commit is contained in:
rockerBOO
2025-01-12 14:47:49 -05:00
parent 2bbb40ce51
commit 0456858992

View File

@@ -1385,6 +1385,7 @@ class NetworkTrainer:
# 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: