From f23843d33a4fa5a38f5034deab8f473793732ee3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Sat, 1 Jul 2023 13:13:06 +0200 Subject: [PATCH] Update. --- main.py | 2 ++ maze.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 0c2ff24..45bddb7 100755 --- a/main.py +++ b/main.py @@ -187,6 +187,8 @@ def masked_inplace_autoregression( progress_bar_desc="autoregression", device=torch.device("cpu"), ): + # p = logits.softmax(1) + # entropy[:,s]= p.xlogy(p).sum(1) / math.log(2) batches = zip(input.split(batch_size), ar_mask.split(batch_size)) if progress_bar_desc is not None: tqdm.tqdm( diff --git a/maze.py b/maze.py index fd0a1d2..f6a852e 100755 --- a/maze.py +++ b/maze.py @@ -285,7 +285,7 @@ def save_image( ) imgs = torch.cat((imgs, c_score_paths.unsqueeze(1)), 1) - img = torch.tensor([224, 224, 224]).view(1, -1, 1, 1) + img = torch.tensor([255, 255, 0]).view(1, -1, 1, 1) # NxKxCxHxW if path_optimal is not None: -- 2.39.5