===============getInfoFromCudaEngine==================
mEngine->getMaxBatchSize() = 8
mEngine->getDeviceMemorySize = 840704
Input tensor [0] name is:input.1
Input [0] data type is: float
input [0] nbDims = 4
input [ 0] shape = [1,3,224,224,]
Output tensor [0] name is:100
Output [1] data type is: float
output [1] nbDims = 2
output [ 1] shape = [1,2,]
Load model sucess
Read img finished!
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.3.0-dev) /home/rzh/ncnn_test/opencv/modules/core/src/matrix.cpp:235: error: (-215:Assertion failed) s >= 0 in function 'setSize'
操作步骤如下:
cd Generate_LibMyTtrEngine-trt721/src
vim CMakeLists.txt 设置cuda目录(例如:/usr/local/cuda-11.0/include)
make build
cd build
cmake ..
make
在Generate_LibMyTtrEngine-trt721/bin目录下生成libMyTtrEngine-trt721.so动态库