From f2e47caba9966d03bff15d3058fa208a0778b160 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Sun, 12 Mar 2023 08:12:00 +0100 Subject: [PATCH] Update --- beaver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beaver.py b/beaver.py index c68fe76..b0e8a78 100755 --- a/beaver.py +++ b/beaver.py @@ -227,7 +227,7 @@ class TaskMaze(Task): result = input.clone() ar_mask = result.new_zeros(result.size()) ar_mask[:, self.height * self.width :] = 1 - result *= 1-ar_mask + result *= 1 - ar_mask masked_inplace_autoregression(model, self.batch_size, result, ar_mask) mazes, paths = self.seq2map(result) nb_correct += maze.path_correctness(mazes, paths).long().sum() @@ -258,13 +258,13 @@ class TaskMaze(Task): result = input.clone() ar_mask = result.new_zeros(result.size()) ar_mask[:, self.height * self.width :] = 1 - result *= 1-ar_mask + result *= 1 - ar_mask masked_inplace_autoregression(model, self.batch_size, result, ar_mask) mazes, paths = self.seq2map(input) _, predicted_paths = self.seq2map(result) maze.save_image( - f"result_{n_epoch:04d}.png", + os.path.join(args.result_dir, f"result_{n_epoch:04d}.png"), mazes, paths, predicted_paths, -- 2.39.5