Skip to content

Commit 20f9ee2

Browse files
authored
Merge pull request #464 from namangup/patch-1
load weights to cpu by default
2 parents 4272fd0 + de08806 commit 20f9ee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

efficientdet_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
model = EfficientDetBackbone(compound_coef=compound_coef, num_classes=len(obj_list),
6060
ratios=anchor_ratios, scales=anchor_scales)
61-
model.load_state_dict(torch.load(f'weights/efficientdet-d{compound_coef}.pth'))
61+
model.load_state_dict(torch.load(f'weights/efficientdet-d{compound_coef}.pth', map_location='cpu'))
6262
model.requires_grad_(False)
6363
model.eval()
6464

0 commit comments

Comments
 (0)