From: François Fleuret Date: Sat, 1 Jul 2023 11:13:06 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=f23843d33a4fa5a38f5034deab8f473793732ee3;p=picoclvr.git Update. --- 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: