Spaces:
Runtime error
Runtime error
Commit
•
2496d9f
1
Parent(s):
7ea3fea
map saved model onto cpu
Browse files
app.py
CHANGED
@@ -12,7 +12,9 @@ from utils import (
|
|
12 |
N = 16
|
13 |
|
14 |
cvae = ConditionalVariationalAutoEncoder()
|
15 |
-
|
|
|
|
|
16 |
|
17 |
def generate(class_, species_, gender_):
|
18 |
c_i = classes.index(class_)
|
|
|
12 |
N = 16
|
13 |
|
14 |
cvae = ConditionalVariationalAutoEncoder()
|
15 |
+
|
16 |
+
# read state dict and map onto cpu
|
17 |
+
cvae.load_state_dict(torch.load('cvae.pth', map_location=torch.device('cpu')))
|
18 |
|
19 |
def generate(class_, species_, gender_):
|
20 |
c_i = classes.index(class_)
|