Skip to content

Commit 61bd683

Browse files
Update util.py (#126)
1 parent 2f4564e commit 61bd683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synapse_net/inference/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def get_prediction_torch_em(
219219
if os.path.isdir(model_path): # Load the model from a torch_em checkpoint.
220220
model = torch_em.util.load_model(checkpoint=model_path, device=device)
221221
else: # Load the model directly from a serialized pytorch model.
222-
model = torch.load(model_path)
222+
model = torch.load(model_path, weights_only=False)
223223

224224
# Run prediction with the model.
225225
with torch.no_grad():

0 commit comments

Comments
 (0)