Spaces:
Sleeping
Sleeping
sr
Browse files- factories.py +2 -2
factories.py
CHANGED
@@ -89,14 +89,14 @@ class PhysicsWithGenerator(torch.nn.Module):
|
|
89 |
padding='constant',
|
90 |
noise_model=dinv.physics.GaussianNoise(sigma=0.1),
|
91 |
device=device_str)
|
92 |
-
list_filters = ["bicubic"]
|
93 |
list_factors = [2, 4]
|
94 |
self.physics_generator = dinv.physics.generator.DownsamplingGenerator(filters=list_filters, factors=list_factors,
|
95 |
device=device_str) + SigmaGenerator(sigma_min=0.0, sigma_max=0.05, device=device_str)
|
96 |
self.generator = self.physics_generator # here do not add noise
|
97 |
self.saved_params = {"updatable_params": {"sigma": 0.0, "factor": 4},
|
98 |
"updatable_params_converter": {"sigma": float, "factor": int},
|
99 |
-
"fixed_params": {"noise_sigma_min": 0., "noise_sigma_max": 0
|
100 |
"list_filters": list_filters, "list_factors": list_factors}}
|
101 |
elif self.name == "Inpainting":
|
102 |
sigma = 0.05
|
|
|
89 |
padding='constant',
|
90 |
noise_model=dinv.physics.GaussianNoise(sigma=0.1),
|
91 |
device=device_str)
|
92 |
+
list_filters = ["bicubic", "bilinear"]
|
93 |
list_factors = [2, 4]
|
94 |
self.physics_generator = dinv.physics.generator.DownsamplingGenerator(filters=list_filters, factors=list_factors,
|
95 |
device=device_str) + SigmaGenerator(sigma_min=0.0, sigma_max=0.05, device=device_str)
|
96 |
self.generator = self.physics_generator # here do not add noise
|
97 |
self.saved_params = {"updatable_params": {"sigma": 0.0, "factor": 4},
|
98 |
"updatable_params_converter": {"sigma": float, "factor": int},
|
99 |
+
"fixed_params": {"noise_sigma_min": 0., "noise_sigma_max": 0.05,
|
100 |
"list_filters": list_filters, "list_factors": list_factors}}
|
101 |
elif self.name == "Inpainting":
|
102 |
sigma = 0.05
|