Update.
authorFrançois Fleuret <francois@fleuret.org>
Wed, 26 Jun 2024 15:18:06 +0000 (17:18 +0200)
committerFrançois Fleuret <francois@fleuret.org>
Wed, 26 Jun 2024 15:18:06 +0000 (17:18 +0200)
quizz_machine.py

index f799bf1..8ee0226 100755 (executable)
@@ -113,7 +113,7 @@ class QuizzMachine:
         if len(c_quizzes) > 0:
             c_quizzes = torch.cat(c_quizzes, dim=0)
             if c_quizzes.size(0) > w_quizzes.size(0) // 2:
-                i = torch.randperm(w_quizzes.size(0))[: w_quizzes.size(0) // 2]
+                i = torch.randperm(c_quizzes.size(0))[: w_quizzes.size(0) // 2]
                 c_quizzes = c_quizzes[i]
 
             i = torch.randperm(w_quizzes.size(0))[