安装linux-C++ torch环境
wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
unzip libtorch-shared-with-deps-latest.zip
是这样的 就这么简单
在cmakefile里面加上libtorch的地址 运行cmake 的时候也加上地址
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/home/huangshan/libtorch ..
cmake –build . –config Release
在后面补一下这么在虚拟机里面安装pytorch