Skip to content

Commit

Permalink
Remove deprecated map_location in export.py (ultralytics#13217)
Browse files Browse the repository at this point in the history
Signed-off-by: Sangbum Daniel Choi <[email protected]>
  • Loading branch information
SangbumChoi authored Jul 25, 2024
1 parent d611217 commit 6deb2d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def export_torchscript(model, im, file, optimize, prefix=colorstr("TorchScript:"
# Load model
weights = 'yolov5s.pt'
device = select_device('')
model = attempt_load(weights, map_location=device)
model = attempt_load(weights, device=device)
# Example input tensor
im = torch.zeros(1, 3, 640, 640).to(device)
Expand Down

0 comments on commit 6deb2d7

Please sign in to comment.