【深度學習技術】如何用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

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