From: François Fleuret Date: Wed, 17 Jul 2024 03:33:49 +0000 (+0200) Subject: Update. X-Git-Url: https://ant.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0abbb44ee38dccfa869bbce8efe67131692cc3b;p=culture.git Update. --- 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: