【深度学习技术】如何用C++加载pytorch模型并进行推理部署

训练好的pytorch模型,不想再用C++把模型实现,而只想用C++进行模型部署,那么可以参考下面的文档:

https://pengyizhang.github.io/2020/03/19/pytorch_script_cplusplus/

Step 1: Converting Your PyTorch Model to Torch Script

Step 2: Serializing Your Script Module to a File

Step 3: Loading Your Script Module in C++

Step 4: Executing the Script Module in C++

Step 5: Getting Help and Exploring the API

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