From 4ef39c69e9fb2c54022bbd8f4f7d26a9c93213d7 Mon Sep 17 00:00:00 2001 From: "Mao, Zhiyuan" Date: Wed, 1 Sep 2021 15:59:20 -0400 Subject: [PATCH] Update demo.py --- demo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/demo.py b/demo.py index dbb5912..3105f51 100644 --- a/demo.py +++ b/demo.py @@ -32,15 +32,16 @@ # Uncomment the following line to generate correlation matrix # corr_mat(-0.1,'./data/') -# Generate correlation matrix for tilt. Do this once for each different turbulence parameter. -tilt_mat(x.shape[1], 0.1, 0.05, 3000) - # Load image, permute axis if color x = plt.imread('./images/color.png') + if len(x.shape) == 3: x = x.transpose((2,0,1)) x = torch.tensor(x, device = device, dtype=torch.float32) +# Generate correlation matrix for tilt. Do this once for each different turbulence parameter. +tilt_mat(x.shape[1], 0.1, 0.05, 3000) + # Simulate simulator = Simulator(2, 512).to(device, dtype=torch.float32)