From 6deb2d75cb6b518111cadec8dd04b8b9018ee000 Mon Sep 17 00:00:00 2001 From: Sangbum Daniel Choi <34004152+SangbumChoi@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:02:17 +0900 Subject: [PATCH] Remove deprecated `map_location` in export.py (#13217) Signed-off-by: Sangbum Daniel Choi <34004152+SangbumChoi@users.noreply.github.com> --- export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.py b/export.py index 30944a93aff8..f5db08096025 100644 --- a/export.py +++ b/export.py @@ -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)