mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 12:45:25 +03:00
use tensor api
This commit is contained in:
parent
4ea2e16ecd
commit
13f9fe3b48
@ -106,8 +106,8 @@ class TensorRtDetector(DetectionApi):
|
|||||||
for i in range(self.engine.num_bindings):
|
for i in range(self.engine.num_bindings):
|
||||||
name = self.engine.get_tensor_name(i)
|
name = self.engine.get_tensor_name(i)
|
||||||
shape = (
|
shape = (
|
||||||
tuple(self.engine.get_binding_shape(name)),
|
tuple(self.engine.get_tensor_shape(name)),
|
||||||
trt.nptype(self.engine.get_binding_dtype(name)),
|
trt.nptype(self.engine.get_tensor_dtype(name)),
|
||||||
)
|
)
|
||||||
if self.engine.get_tensor_mode(name) == trt.TensorIOMode.INPUT:
|
if self.engine.get_tensor_mode(name) == trt.TensorIOMode.INPUT:
|
||||||
input_shape = shape
|
input_shape = shape
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user