- result = torch.cat(
- (seq_start[:, None, :], seq_end[:, None, :], seq_predicted[:, None, :]), 1
- )
- result = result.reshape(-1, result.size(-1))
-
- frames = self.seq2frame(result)
- image_name = os.path.join(result_dir, f"world_result_{n_epoch:04d}.png")
- torchvision.utils.save_image(
- frames.float() / (world.Box.nb_rgb_levels - 1),
- image_name,
- nrow=12,
- padding=1,
- pad_value=0.0,
- )
- logger(f"wrote {image_name}")
+ filename = os.path.join(result_dir, f"test_errors_{n_epoch:04d}.dat")
+ with open(filename, "w") as f:
+ for e in error_test:
+ f.write(f"{e}\n")