【pytorch】torch2trt

1,介紹
torch2trt 是一個易於使用的PyTorch到TensorRT轉換器

2,安裝

sudo apt-get install libprotobuf* protobuf-compiler ninja-build
git clone https://github.com/NVIDIA-AI-IOT/torch2trt
cd torch2trt
python setup.py install --plugins # 虛擬環境

報錯,#NvInfer.h,找不到,修改setup.py

def trt_inc_dir():
    return "../targets/x86_64-linux-gnu/include"

def trt_lib_dir():
    return "../targets/x86_64-linux-gnu/lib"

3,應用

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章