Skip to content

mboboGO/pt2trt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pt2trt

Requirements

py3.6 pytorch tensorrt v7 onnx onnxsim pycuda

onnx&prt install

pycuda

pip install pycuda

onnx

```shell
pip install onnx
pip install onnx-simplifier
```

trt

Notably, the trt version should be compatible with the py version:

  1. Downloading tensorrt in 'https://developer.nvidia.com/nvidia-tensorrt-7x-download'
  2. tar xzvf xxx & cd TensorRT-7.x.x.x/python & pip install tensorrt-7.x.x.x-cpxx-none-linux_x86_64.whl

pth to onnx

  1. convert pth to onnx: changing config file in config.py modifying the function of load_model pth2onnx/pth_to_onnx.py

    python pth2onnx/pth_to_onnx.py
    python pth2onnx/inference_onnx.py
  2. testing the onnx

    python pth2onnx/inference_onnx.py

pth to trt

  1. convert onnx to trt: changing config file in config.py modifying the function of load_model onnx2trt/onnx2trt.py

    python onnx2trt/onnx_to_trt.py
    python onnx2trt/inference_trt.py
  2. testing the trt

    python onnx2trt/inference_trt.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages