Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ weightsPATH = './clipseg/weights/rd64-uni.pth'
|
|
78 |
state = {'model': model.state_dict()}
|
79 |
torch.save(state, weightsPATH)
|
80 |
|
81 |
-
model.load_state_dict(torch.load(weightsPATH
|
82 |
#model.load_state_dict(torch.load(weightsPATH)['model'])
|
83 |
|
84 |
print ("Torch load(model) : ", model)
|
|
|
78 |
state = {'model': model.state_dict()}
|
79 |
torch.save(state, weightsPATH)
|
80 |
|
81 |
+
model.load_state_dict(torch.load(weightsPATH, map_location=torch.device(device)), strict=False) #False
|
82 |
#model.load_state_dict(torch.load(weightsPATH)['model'])
|
83 |
|
84 |
print ("Torch load(model) : ", model)
|