scores = scores.reshape(-1, task.height, task.width)
mazes = mazes.reshape(-1, task.height, task.width)
targets = targets.reshape(-1, task.height, task.width)
+ filename = (
+ f"oneshot_{args.oneshot_input}_{args.oneshot_output}_{n_epoch:04d}.png"
+ )
maze.save_image(
- os.path.join(
- args.result_dir,
- f"oneshot_{args.oneshot_input}_{args.oneshot_output}_{n_epoch:04d}.png",
- ),
+ os.path.join(args.result_dir, filename),
mazes=mazes,
score_paths=scores,
score_truth=targets,
)
+ log_string(f"wrote {filename}")
+
# -------------------
gpt.train(t)
mazes, paths = self.seq2map(input)
_, predicted_paths = self.seq2map(result)
+ filename = f"result_{n_epoch:04d}.png"
maze.save_image(
- os.path.join(args.result_dir, f"result_{n_epoch:04d}.png"),
+ os.path.join(args.result_dir, filename),
mazes=mazes,
target_paths=paths,
predicted_paths=predicted_paths,
path_correct=maze.path_correctness(mazes, predicted_paths),
)
+ log_string(f"wrote {filename}")
model.train(t)