Update.
authorFrançois Fleuret <francois@fleuret.org>
Sat, 6 Jul 2024 05:16:13 +0000 (08:16 +0300)
committerFrançois Fleuret <francois@fleuret.org>
Sat, 6 Jul 2024 05:16:13 +0000 (08:16 +0300)
main.py
quiz_machine.py

diff --git a/main.py b/main.py
index 585cbdf..597ec32 100755 (executable)
--- 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
index 0c76239..d4af770 100755 (executable)
@@ -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