Fixed progress bar output for epoch

This commit is contained in:
alg-wiki 2022-10-10 17:31:33 +09:00
parent 3110f895b2
commit 4ee7519fc2
No known key found for this signature in database
GPG key ID: 9D27E57D1F43E750

View file

@ -228,7 +228,7 @@ def train_embedding(embedding_name, learn_rate, data_root, log_directory, traini
optimizer.step()
epoch_num = math.floor(embedding.step / epoch_len)
epoch_step = embedding.step - (epoch_num * epoch_len)
epoch_step = embedding.step - (epoch_num * epoch_len) + 1
pbar.set_description(f"[Epoch {epoch_num}: {epoch_step}/{epoch_len}]loss: {losses.mean():.7f}")