msong97 commited on
Commit
82ee0ed
·
1 Parent(s): 92c07f0

Syntax error fix and remove unused code

Browse files
Files changed (1) hide show
  1. evals.py +1 -4
evals.py CHANGED
@@ -312,9 +312,6 @@ class BaselineModel(torch.nn.Module):
312
  # Specify the denoising prior
313
  self.prior = dinv.optim.prior.PnP(denoiser=ct_drunet)
314
 
315
- def circular_roll(self, tensor, p_h, p_w):
316
- return tensor.roll(shifts=(p_h, p_w), dims=(-2, -1))
317
-
318
  def get_DPIR_params(self, noise_level_img, max_iter=8):
319
  r"""
320
  Default parameters for the DPIR Plug-and-Play algorithm.
@@ -401,7 +398,7 @@ class BaselineModel(torch.nn.Module):
401
  params_algo=params_algo,
402
  )
403
  return model(y, physics=physics)
404
- else self.name == "DPIR_CT":
405
  # Set the DPIR algorithm parameters
406
  sigma_float = physics.noise_model.sigma.item() # sigma should be a single value
407
  lip_const = physics.compute_norm(physics.A_adjoint(y))
 
312
  # Specify the denoising prior
313
  self.prior = dinv.optim.prior.PnP(denoiser=ct_drunet)
314
 
 
 
 
315
  def get_DPIR_params(self, noise_level_img, max_iter=8):
316
  r"""
317
  Default parameters for the DPIR Plug-and-Play algorithm.
 
398
  params_algo=params_algo,
399
  )
400
  return model(y, physics=physics)
401
+ elif self.name == "DPIR_CT":
402
  # Set the DPIR algorithm parameters
403
  sigma_float = physics.noise_model.sigma.item() # sigma should be a single value
404
  lip_const = physics.compute_norm(physics.A_adjoint(y))