【tensorrt】——报错:发生异常: TypeError pybind11::init(): factory function returned nullptr
·
描述:
采用tensorrt python api载入序列化的模型时,报错:
发生异常: TypeError
pybind11::init(): factory function returned nullptr
code
with open(self.model, 'rb') as f, trt.Runtime(self.trt_logger) as runtime:
return runtime.deserialize_cuda_engine(f.read())
原因
在main.py 中 import torch 的时候,就会报这样的错误。只能在tensorrt和pytorch中用一个??
pytorch为1.1.0版本

更多推荐



所有评论(0)