Kaynağa Gözat

Check `'onnxruntime-gpu' if torch.has_cuda` (#5087)

* Check `'onnxruntime-gpu' if torch.has_cuda`

* fix indent
modifyDataloader
Glenn Jocher GitHub 2 yıl önce
ebeveyn
işleme
b754525e99
Veri tabanında bu imza için bilinen anahtar bulunamadı GPC Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. +1
    -1
      detect.py

+ 1
- 1
detect.py Dosyayı Görüntüle

@@ -92,7 +92,7 @@ def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s)
# check_requirements(('opencv-python>=4.5.4',))
net = cv2.dnn.readNetFromONNX(w)
else:
check_requirements(('onnx', 'onnxruntime'))
check_requirements(('onnx', 'onnxruntime-gpu' if torch.has_cuda else 'onnxruntime'))
import onnxruntime
session = onnxruntime.InferenceSession(w, None)
else: # TensorFlow models

Yükleniyor…
İptal
Kaydet