tf_to_trt_image_classification
tf_to_trt_image_classification copied to clipboard
A problem when make
I got a error when I make the project, who knows how can I solve it? cuda version :8.0 TensorRT :3.0.4 env: Ubantu
The following is the error information: `project/tf_to_trt_image_classification-master/examples/classify_image/classify_image.cu:10:21: fatal error: NvInfer.h: No such file or directory #include <NvInfer.h> ^ compilation terminated. CMake Error at classify_image_generated_classify_image.cu.o.cmake:207 (message): Error generating /project/tf_to_trt_image_classification-master/build/examples/classify_image/CMakeFiles/classify_image.dir//./classify_image_generated_classify_image.cu.o
make[2]: *** [examples/classify_image/CMakeFiles/classify_image.dir/classify_image_generated_classify_image.cu.o] Error 1 make[1]: *** [examples/classify_image/CMakeFiles/classify_image.dir/all] Error 2 make: *** [all] Error 2`
Hello. This project is currently targeting Jetson TX2 / JetPack 3.2.
Did you flash your Jetson using the latest JetPack 3.2? This should install CUDA 9.0 and TensorRT 3.0.4 (which includes NvInfer.h).
Hi, is there a way to make this work for 1080ti? A cmake beginner here, any help would be appreciated!
Hi Mike,
I was able to get over this error by installing tensorrt with tar and adding the header files to LD_LIBRARY_PATH
All header files are under TensorRT-3.0.4/include/ NvCaffeParser.h NvInfer.h NvInferPlugin.h NvUffParser.h NvUtils.h
But I ran into the error below haha
[ 25%] Building NVCC (Device) object examples/classify_image/CMakeFiles/classify_image.dir/classify_image_generated_classify_image.cu.o
[ 50%] Linking CXX executable classify_image
[ 50%] Built target classify_image
Scanning dependencies of target uff_to_plan
[ 75%] Building CXX object src/CMakeFiles/uff_to_plan.dir/uff_to_plan.cpp.o
[100%] Linking CXX executable uff_to_plan
CMakeFiles/uff_to_plan.dir/uff_to_plan.cpp.o: In function nvinfer1::(anonymous namespace)::createInferBuilder(nvinfer1::ILogger&)': uff_to_plan.cpp:(.text+0x19): undefined reference to
createInferBuilder_INTERNAL'
CMakeFiles/uff_to_plan.dir/uff_to_plan.cpp.o: In function main': uff_to_plan.cpp:(.text+0x529): undefined reference to
nvuffparser::createUffParser()'
collect2: error: ld returned 1 exit status
src/CMakeFiles/uff_to_plan.dir/build.make:94: recipe for target 'src/uff_to_plan' failed
make[2]: *** [src/uff_to_plan] Error 1
CMakeFiles/Makefile2:158: recipe for target 'src/CMakeFiles/uff_to_plan.dir/all' failed
make[1]: *** [src/CMakeFiles/uff_to_plan.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I solved this problem by replacing cv::Mat image= cv::imread(imageFilename, CV_LOAD_IMAGE_COLOR); line with cv::Mat image = cv::imread(imageFileName);
Another make error
Installed TensorRT-3.0.4.Ubuntu-16.04.3.x86_64.cuda-9.0.cudnn7.0.tar.gz, error same for latest TensorRT-4.0.1.6.Ubuntu-16.04.4.x86_64-gnu.cuda-9.0.cudnn7.1.tar.gz
Any help would be appreciated.
Thanks a lot!
Any news for this error ? I met the exact same error even with TensorRT-4.0.1.6.Ubuntu-16.04.4.x86_64-gnu.cuda-9.0.cudnn7.1.tar.gz..
Another make error
Installed TensorRT-3.0.4.Ubuntu-16.04.3.x86_64.cuda-9.0.cudnn7.0.tar.gz, error same for latest TensorRT-4.0.1.6.Ubuntu-16.04.4.x86_64-gnu.cuda-9.0.cudnn7.1.tar.gz
Any help would be appreciated.
Thanks a lot!
As stated in the log, the nvuffparser::IUffParser::registerInput method requires 3 arguments (see the docs).
Try to use UffInputOrder::kNCHW
as third argument or any other enum value declared in NvUffParser.h.
Try sudo aptitude install libnvinfer5 libnvinfer-dev