From f290af5224c4582e0ab64dbf627fb0d1c71e9044 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Fri, 12 Jul 2024 12:49:58 +0200 Subject: [PATCH] Update. --- main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 63819f2..6a7ca3f 100755 --- a/main.py +++ b/main.py @@ -323,7 +323,7 @@ def run_tests(model, quiz_machine, deterministic_synthesis, local_device=main_de test_perplexity = math.exp(min(100, acc_test_loss / nb_test_samples)) - log_string(f"test_perplexity {n_epoch} {test_perplexity}") + log_string(f"test_perplexity {n_epoch} model {model.id} {test_perplexity}") model.main_test_accuracy = quiz_machine.produce_results( n_epoch=n_epoch, @@ -359,10 +359,12 @@ def one_epoch(model, quiz_machine, local_device=main_device): train_perplexity = math.exp(min(100, acc_train_loss / nb_train_samples)) - log_string(f"train_perplexity {n_epoch} model.id {model.id} {train_perplexity}") + log_string(f"train_perplexity {n_epoch} model {model.id} {train_perplexity}") run_tests(model, quiz_machine, deterministic_synthesis=False) + model.to(main_device) + ###################################################################### -- 2.39.5