self.save_image(
result[:96],
result_dir,
- f"world_result_{n_epoch:04d}_{model.id:02d}.png",
+ f"world_prediction_{n_epoch:04d}_{model.id:02d}.png",
logger,
)
device=self.device,
)
- nb_correct += (
- (
- (new_quizzes == result).long()
- * (inverted_quizzes, inverted_result).long()
- )
- .min(dim=-1)
- .values
- )
+ nb_correct += (new_quizzes == result).long().min(dim=-1).values * (
+ inverted_quizzes == inverted_result
+ ).long().min(dim=-1).values
return new_quizzes, nb_correct