Spaces:
Runtime error
Runtime error
Update code/do_predict.py
Browse files- code/do_predict.py +1 -1
code/do_predict.py
CHANGED
@@ -20,7 +20,7 @@ model_name = "roberta_softmax.pt"
|
|
20 |
device = torch.device("cuda", 0) if torch.cuda.is_available() else torch.device("cpu")
|
21 |
model_roberta = Model_Softmax(config).to(device)
|
22 |
model_roberta.load_state_dict(
|
23 |
-
state_dict=torch.load(directory + model_name, map_location=device)
|
24 |
)
|
25 |
|
26 |
|
|
|
20 |
device = torch.device("cuda", 0) if torch.cuda.is_available() else torch.device("cpu")
|
21 |
model_roberta = Model_Softmax(config).to(device)
|
22 |
model_roberta.load_state_dict(
|
23 |
+
state_dict=torch.load(directory + model_name, map_location=device), strict=False
|
24 |
)
|
25 |
|
26 |
|