From c0abbb44ee38dccfa869bbce8efe67131692cc3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Wed, 17 Jul 2024 05:33:49 +0200 Subject: [PATCH] Update. --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 74a3cfb..5a37251 100755 --- a/main.py +++ b/main.py @@ -353,7 +353,12 @@ def one_epoch(model, quiz_machine, local_device=main_device): full_input, full_from_w = quiz_machine.data_input(model, split="train") src = zip(full_input.split(args.batch_size), full_from_w.split(args.batch_size)) - for input, from_w in tqdm.tqdm(src, dynamic_ncols=True, desc="training"): + for input, from_w in tqdm.tqdm( + src, + dynamic_ncols=True, + desc="training", + total=full_input.size(0) // args.batch_size, + ): input = input.to(local_device) if nb_train_samples % args.batch_size == 0: -- 2.39.5