Remove deprecated map_location in export.py (#13217)
Signed-off-by: Sangbum Daniel Choi <34004152+SangbumChoi@users.noreply.github.com>
This commit is contained in:
1 parent
d6112173f5
commit
6deb2d75cb
1 file changed
+1
-1
@@ -256,7 +256,7 @@ def export_torchscript(model, im, file, optimize, prefix=colorstr("TorchScript:"
|
|||||||
# Load model
|
# Load model
|
||||||
weights = 'yolov5s.pt'
|
weights = 'yolov5s.pt'
|
||||||
device = select_device('')
|
device = select_device('')
|
||||||
model = attempt_load(weights, map_location=device)
|
model = attempt_load(weights, device=device)
|
||||||
|
|
||||||
# Example input tensor
|
# Example input tensor
|
||||||
im = torch.zeros(1, 3, 640, 640).to(device)
|
im = torch.zeros(1, 3, 640, 640).to(device)
|
||||||
|
|||||||
Reference in new issue
Block a user