TensorRT学习笔记3 - 运行sampleMNIST

目录

  • 步骤
  • 遇到的问题


步骤

  • cd /your/tensorrt/path/samples/sampleMNIST
  • make
  • cd /your/tensorrt/path/bin
  • sudo ./sample_mnist [-h] [–datadir=/your/tensorrt/path//data/mnist/] [–useDLA=1] [–int8]
    TensorRT学习笔记3 - 运行sampleMNIST_第1张图片

遇到的问题

  • ERROR: cudnnEngine.cpp (56) - Cuda Error in initializeCommonContext: 4
            解决办法:加sudo权限执行指令
  • ImportError: libnvinfer.so.5: cannot open shared object file: No such file or directory
           解决办法:将这个文件从TensorRT的lib目录中拷贝至/usr/lib
           指令:sudo cp /home/user/tensorrt_tar/TensorRT-5.1.5.0/targets/x86_64-linux-gnu/lib/libnvinfer.so.5 /usr/lib/
  • ImportError: libnvparsers.so.5: cannot open shared object file: No such file or directory
           解决方法:同上
           指令:sudo cp /home/user/tensorrt_tar/TensorRT-5.1.5.0/targets/x86_64-linux-gnu/lib/libnvparsers.so.5 /usr/lib/

你可能感兴趣的:(#,TensorRT)