Spaces:
Runtime error
Runtime error
Commit
·
984dfaf
1
Parent(s):
4c8b5d4
Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ class Generator(torch.nn.Module):
|
|
150 |
torch.nn.init.normal_(m.conv.weight,mean,std)
|
151 |
torch.nn.init.constant_(m.conv.bias,0)
|
152 |
|
153 |
-
model = Generator(3, 32, 3, 4).
|
154 |
model.load_state_dict(torch.load('G_A_HW4_SAVE.pt',map_location=torch.device('cpu')))
|
155 |
print(model)
|
156 |
model.eval()
|
|
|
150 |
torch.nn.init.normal_(m.conv.weight,mean,std)
|
151 |
torch.nn.init.constant_(m.conv.bias,0)
|
152 |
|
153 |
+
model = Generator(3, 32, 3, 4).cpu() # input_dim, num_filter, output_dim, num_resnet
|
154 |
model.load_state_dict(torch.load('G_A_HW4_SAVE.pt',map_location=torch.device('cpu')))
|
155 |
print(model)
|
156 |
model.eval()
|