ultralytics 8.0.35 TensorRT, ONNX and OpenVINO predict and val (#929)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Pedley <ericpedley@gmail.com>
This commit is contained in:
Glenn Jocher 2023-02-11 21:31:49 +04:00 committed by GitHub
parent d32b339373
commit 977fd8f0b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 88 additions and 69 deletions

View file

@ -95,7 +95,7 @@ class BaseValidator:
assert model is not None, "Either trainer or model is needed for validation"
self.device = select_device(self.args.device, self.args.batch)
self.args.half &= self.device.type != 'cpu'
model = AutoBackend(model, device=self.device, dnn=self.args.dnn, fp16=self.args.half)
model = AutoBackend(model, device=self.device, dnn=self.args.dnn, data=self.args.data, fp16=self.args.half)
self.model = model
stride, pt, jit, engine = model.stride, model.pt, model.jit, model.engine
imgsz = check_imgsz(self.args.imgsz, stride=stride)