Spaces:
Sleeping
Sleeping
sr
Browse files
app.py
CHANGED
|
@@ -83,11 +83,16 @@ def generate_imgs(x: torch.Tensor,
|
|
| 83 |
|
| 84 |
if hasattr(physics.physics, 'tensor_size'):
|
| 85 |
physics.physics.tensor_size = x.shape[1:]
|
|
|
|
|
|
|
| 86 |
|
| 87 |
if physics.physics_generator is not None: # we only change physic params but not noise levels
|
| 88 |
if hasattr(physics.physics_generator, 'tensor_size'):
|
| 89 |
physics.physics_generator.tensor_size = x.shape[1:]
|
| 90 |
physics.generator.tensor_size = x.shape[1:]
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
### Compute y
|
| 93 |
with torch.no_grad():
|
|
|
|
| 83 |
|
| 84 |
if hasattr(physics.physics, 'tensor_size'):
|
| 85 |
physics.physics.tensor_size = x.shape[1:]
|
| 86 |
+
elif hasattr(physics.physics, 'imsize'):
|
| 87 |
+
physics.physics.imsize = x.shape[1:]
|
| 88 |
|
| 89 |
if physics.physics_generator is not None: # we only change physic params but not noise levels
|
| 90 |
if hasattr(physics.physics_generator, 'tensor_size'):
|
| 91 |
physics.physics_generator.tensor_size = x.shape[1:]
|
| 92 |
physics.generator.tensor_size = x.shape[1:]
|
| 93 |
+
if hasattr(physics.physics_generator, 'imsize'):
|
| 94 |
+
physics.physics_generator.imsize = x.shape[1:]
|
| 95 |
+
physics.generator.imsize = x.shape[1:]
|
| 96 |
|
| 97 |
### Compute y
|
| 98 |
with torch.no_grad():
|