cpp-pytorch
cpp-pytorch copied to clipboard
build error
cmake -DCMAKE_PREFIX_PATH=$PWD/../libtorch ..
got error:
[ 50%] Building CXX object CMakeFiles/example-app.dir/example-app.cpp.o
/home/luban/cpp-pytorch/example-app.cpp:3:27: fatal error: torch/Tensor.h: No such file or directory
#include <torch/Tensor.h>
please provide the correct path of libtorch
@yjhjstz @iamhankai @1343464520 怎么解决/data/2019-06/libtorch/cpp-pytorch/example-app.cpp:3:27: fatal error: torch/Tensor.h: 没有那个文件或目录 此问题?
我的libtorch path没有问题 请教一下,谢谢!
#include "torch/Tensor.h"
Tyr like this?
在CMakeLists.txt里把GCC改成14,再把#include <torch/Tensor.h> 注掉就行了
改成:#include<ATen/core/Tensor.h>