From ceddc8cc3adbb045fdef1ccb0b3df2b8fed9eb4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Sat, 6 Jul 2024 08:16:13 +0300 Subject: [PATCH] Update. --- main.py | 4 +++- quiz_machine.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 585cbdf..597ec32 100755 --- a/main.py +++ b/main.py @@ -57,7 +57,7 @@ parser.add_argument("--nb_train_samples", type=int, default=None) parser.add_argument("--nb_test_samples", type=int, default=None) -parser.add_argument("--learning_rate", type=float, default=1e-3) +parser.add_argument("--learning_rate", type=float, default=5e-4) ######################################## @@ -484,6 +484,8 @@ def create_c_quizzes( quizzes_and_nb_correct_records, criteria=lambda nb_correct: nb_correct == n )[:72] + quiz_machine.reverse_random_half_in_place(q) + if q.size(0) > 0: quiz_machine.save_quizzes( args.result_dir, f"culture_c_quiz_{n_epoch:04d}_N{n}{s}", q diff --git a/quiz_machine.py b/quiz_machine.py index 0c76239..d4af770 100755 --- a/quiz_machine.py +++ b/quiz_machine.py @@ -359,11 +359,11 @@ class QuizMachine: backward_nb_total = correct[n_backward].size(0) self.logger( - f"forward_accuracy {log_prefix} {n_epoch} {model.id=} {forward_nb_correct} / {forward_nb_total}" + f"{log_prefix}_forward_accuracy {n_epoch} {model.id=} {forward_nb_correct} / {forward_nb_total}" ) self.logger( - f"backward_accuracy {log_prefix} {n_epoch} {model.id=} {backward_nb_correct} / {backward_nb_total}" + f"{log_prefix}_backward_accuracy {n_epoch} {model.id=} {backward_nb_correct} / {backward_nb_total}" ) return result, correct -- 2.39.5