Open qinb opened 5 years ago
版本是Pytorch1.0的。 工程里面本身就包含有CmakeLists.txt, 请问您哪里在出错了呢,是找不到torch吗?
版本是Pytorch1.0的。 工程里面本身就包含有CmakeLists.txt, 请问您哪里在出错了呢,是找不到torch吗?
多谢回答哈,我使用是源码安装的pytorch1.0。我在您的工程下面直接cmake .,显示的错误是:
By not providing "FindCaffe2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Caffe2", but CMake did not find one.
Could not find a package configuration file provided by "Caffe2" with any of the following names: Caffe2Config.cmake caffe2-config.cmake
所以想问你是如何编译的呢?再次感谢哈!
版本是Pytorch1.0的。 工程里面本身就包含有CmakeLists.txt, 请问您哪里在出错了呢,是找不到torch吗?
多谢回答哈,我使用是源码安装的pytorch1.0。我在您的工程下面直接cmake .,显示的错误是:
By not providing "FindCaffe2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Caffe2", but CMake did not find one.
Could not find a package configuration file provided by "Caffe2" with any of the following names: Caffe2Config.cmake caffe2-config.cmake
所以想问你是如何编译的呢?再次感谢哈!
项目目录下的CMakeLists.txt,第9行:
# caffe2
if (${CMAKE_BUILD_TYPE} STREQUAL "Release" )
list(APPEND CMAKE_PREFIX_PATH "/opt/Caffe2")
message(STATUS "caffe2 in /opt/caffe2")
else()
list(APPEND CMAKE_PREFIX_PATH "/opt/Caffe2-Debug")
message(STATUS "caffe2 in /opt/caffe2-debug")
endif()
把里面的 /opt/Caffe2
和(或) /opt/Caffe2-Debug
改成你自己的Caffe2安装目录。
非常感谢你提供这些代码,请问编译的cmake文件还有吗?能不能给我传一份,我这边编译无法通过,非常感谢!弱弱的问一句,您使用的是pytorch.1.0吗?