self.train_c_quizzes = []
self.test_c_quizzes = []
- def save_quizzes(
+ def save_quiz_illustrations(
self,
result_dir,
filename_prefix,
predicted_prompts *= 2
predicted_answers *= 2
- self.problem.save_quizzes(
+ self.problem.save_quiz_illustrations(
result_dir,
filename_prefix,
quizzes[:, 1 : 1 + self.prompt_len],
##############################
- self.save_quizzes(
+ self.save_quiz_illustrations(
result_dir,
f"culture_prediction_{n_epoch:04d}_{model.id:02d}",
quizzes=test_result[:72],
def logproba_of_solutions(self, models, c_quizzes):
logproba = c_quizzes.new_zeros(
- c_quizzes.size(0), len(models), device=self.device
+ c_quizzes.size(0), len(models), device=self.device, dtype=torch.float32
)
for model in models: