VIVEK JAYARAM commited on
Commit
22a317f
·
1 Parent(s): b47701d
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -76,7 +76,7 @@ def generate_noisy_image(image_choice, noise_sigma, operator_key):
76
 
77
  # Store necessary data for restoration
78
  data = {
79
- 'noisy_measurement': noisy_measurement,
80
  'operator': operator,
81
  'noise_function': noise_function
82
  }
@@ -91,7 +91,7 @@ def run_restoration(data, T, K):
91
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
92
 
93
  # Extract stored data
94
- noisy_measurement = data['noisy_measurement']
95
  operator = data['operator']
96
  noise_function = data['noise_function']
97
 
 
76
 
77
  # Store necessary data for restoration
78
  data = {
79
+ 'noisy_measurement': noisy_measurement.cpu(),
80
  'operator': operator,
81
  'noise_function': noise_function
82
  }
 
91
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
92
 
93
  # Extract stored data
94
+ noisy_measurement = data['noisy_measurement'].to(device)
95
  operator = data['operator']
96
  noise_function = data['noise_function']
97