Remove deprecated `map_location` in export.py (#13217)

Signed-off-by: Sangbum Daniel Choi <34004152+SangbumChoi@users.noreply.github.com>
pull/13220/head
Sangbum Daniel Choi 2024-07-25 21:02:17 +09:00 committed by GitHub
parent d6112173f5
commit 6deb2d75cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)