Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ class Generator(nn.Module):
|
|
7 |
def __init__(self):
|
8 |
super(Generator, self).__init__()
|
9 |
self.main = nn.Sequential(
|
10 |
-
nn.ConvTranspose2d(
|
11 |
nn.BatchNorm2d(64 * 8),
|
12 |
nn.ReLU(True),
|
13 |
|
@@ -39,7 +39,7 @@ netG.eval()
|
|
39 |
|
40 |
def generate_image():
|
41 |
with torch.no_grad():
|
42 |
-
noise = torch.randn(1,
|
43 |
fake_image = netG(noise)
|
44 |
|
45 |
generated_image = fake_image.squeeze().cpu().numpy()
|
|
|
7 |
def __init__(self):
|
8 |
super(Generator, self).__init__()
|
9 |
self.main = nn.Sequential(
|
10 |
+
nn.ConvTranspose2d(128, 64 * 8, 4, 1, 0, bias=False),
|
11 |
nn.BatchNorm2d(64 * 8),
|
12 |
nn.ReLU(True),
|
13 |
|
|
|
39 |
|
40 |
def generate_image():
|
41 |
with torch.no_grad():
|
42 |
+
noise = torch.randn(1, 128, 1, 1)
|
43 |
fake_image = netG(noise)
|
44 |
|
45 |
generated_image = fake_image.squeeze().cpu().numpy()
|