美文网首页
pytorch c++

pytorch c++

作者: 张亦风 | 来源:发表于2019-10-22 14:44 被阅读0次

pytorch c++的编译过程

下载源码

git clone --recursive https://github.com/pytorch/pytorch
cd pytorch

安装

安装依赖项

numpy pyyaml mkl mkl-include setuptools cmake cffi typing
cd pytorch
python setup.py install
或者python setup.py build develop

卸载

pip uninstall torch
python setup.py clean

编写c++测试代码


cmake报错
Could not find a package configuration file provided by "Torch" with any of
the following names:
TorchConfig.cmake
torch-config.cmake
改为cmake -DCMAKE_PREFIX_PATH=../build/lib

相关文章

网友评论

      本文标题:pytorch c++

      本文链接:https://www.haomeiwen.com/subject/oryqvctx.html