Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
8 |
|
9 |
@torch.inference_mode()
|
10 |
def inference_gan():
|
11 |
-
generator = torch.jit.load("
|
12 |
x = torch.randn(30, 256, device='cuda')
|
13 |
y = generator(x)
|
14 |
y = y.view(-1, 1, 28, 28) # reshape y to have 1 channel
|
@@ -18,7 +18,7 @@ def inference_gan():
|
|
18 |
|
19 |
@torch.inference_mode()
|
20 |
def inference_dcgan():
|
21 |
-
generator = torch.jit.load("
|
22 |
def denorm(img_tensors):
|
23 |
stats = (0.5, 0.5, 0.5), (0.5, 0.5, 0.5)
|
24 |
return img_tensors * stats[1][0] + stats[0][0]
|
|
|
8 |
|
9 |
@torch.inference_mode()
|
10 |
def inference_gan():
|
11 |
+
generator = torch.jit.load("mnist-G-torchscript.pt").to(device)
|
12 |
x = torch.randn(30, 256, device='cuda')
|
13 |
y = generator(x)
|
14 |
y = y.view(-1, 1, 28, 28) # reshape y to have 1 channel
|
|
|
18 |
|
19 |
@torch.inference_mode()
|
20 |
def inference_dcgan():
|
21 |
+
generator = torch.jit.load("animefacedataset-G2-torchscript.pt").to(device)
|
22 |
def denorm(img_tensors):
|
23 |
stats = (0.5, 0.5, 0.5), (0.5, 0.5, 0.5)
|
24 |
return img_tensors * stats[1][0] + stats[0][0]
|