fix map_locations
Browse files
README.md
CHANGED
@@ -12,7 +12,7 @@ The file is given as a state_dict. Thus to initialize the model run:
|
|
12 |
|
13 |
```
|
14 |
# Load pretrained weights
|
15 |
-
state_dict = torch.load(model_path
|
16 |
# Load torchvision model
|
17 |
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(weights=None)
|
18 |
# Adapt input convolution
|
|
|
12 |
|
13 |
```
|
14 |
# Load pretrained weights
|
15 |
+
state_dict = torch.load(model_path)['model']
|
16 |
# Load torchvision model
|
17 |
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(weights=None)
|
18 |
# Adapt input convolution
|