Skip to content

Commit 37a2633

Browse files
authored
Fix epoch updates count logic as drop_last
1 parent bc1df7a commit 37a2633

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/f5_tts/scripts/count_max_epoch_precise.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
random_seed=666,
2121
drop_residual=False,
2222
)
23+
updates_per_epoch = int(len(batch_sampler) / gpus)
2324

2425
print(
25-
f"One epoch has {len(batch_sampler) / gpus} updates if gpus={gpus}, with "
26+
f"One epoch has {updates_per_epoch} updates if gpus={gpus}, with "
2627
f"batch_size_per_gpu={batch_size_per_gpu} (frames) & "
2728
f"max_samples_per_gpu={max_samples_per_gpu}."
2829
)
2930
print(
3031
f"If gpus={gpus}, for max_updates={max_updates} "
31-
f"should set epoch={math.ceil(max_updates / len(batch_sampler) * gpus)}."
32+
f"should set epoch={math.ceil(max_updates / updates_per_epoch)}."
3233
)

0 commit comments

Comments
 (0)