Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -13,4 +13,5 @@ def generate(gan, batch_size=1):
|
|
| 13 |
with torch.no_grad():
|
| 14 |
ims = gan.G(torch.randn(batch_size, gan.latent_dim)).clamp_(0.0, 1.0) * 255
|
| 15 |
ims = ims.permute(0, 2, 3, 1).detach().cpu().numpy().astype(np.uint8)
|
| 16 |
-
return ims
|
|
|
|
|
|
| 13 |
with torch.no_grad():
|
| 14 |
ims = gan.G(torch.randn(batch_size, gan.latent_dim)).clamp_(0.0, 1.0) * 255
|
| 15 |
ims = ims.permute(0, 2, 3, 1).detach().cpu().numpy().astype(np.uint8)
|
| 16 |
+
return ims
|
| 17 |
+
|