mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
a86f9f3438
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user