我对Caffe非常新。我正在遵循此链接:http://adilmoujahid.com/posts/2016/06/introduction-deep-learning-python-caffe/
当我运行此命令时: python create_lmdb.py ,我有以下错误:
文件" create_lmdb.py",第19行,in,导入caffe;Importerror:没有名为" Caffe"的模块
我尝试使用此链接安装CAFFE:https://github.com/bvlc/caffe/tree/windows,特别是以下代码:
C:Projects> git clone https://github.com/BVLC/caffe.git
C:Projects> cd caffe
C:Projectscaffe> git checkout windows
:: Edit any of the options inside build_win.cmd to suit your needs
C:Projectscaffe> scriptsbuild_win.cmd
我有卵泡错误:
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Project_git/caffe/scripts/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
我下载了忍者,但不确定该怎么做。因此,我尝试用_ninja = 1 to_ninja = 0进行更改,然后我有以下错误
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Python34/python.exe (found suitable version "3.4.3", minimum required is "2.7")
CMake Error at cmake/WindowsDownloadPrebuiltDependencies.cmake:29 (message):
Could not find url for MSVC version = 1900 and Python version = 3.4.
Call Stack (most recent call first):
CMakeLists.txt:75 (include)
-- Configuring incomplete, errors occurred!
See also C:/Project_git/caffe/scripts/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
请让我知道应该是我的下一步!预先感谢!
步骤#1
在记事本 中打开build_win.cmd,然后更新文件行,如下(diable ninja build)
:: Change to 1 to use Ninja generator (builds much faster)
if NOT DEFINED WITH_NINJA set WITH_NINJA=0
我正在使用Microsoft Visual Studio 2013
:: Change MSVC_VERSION to 12 to use VS 2013
if NOT DEFINED MSVC_VERSION set MSVC_VERSION=12
步骤#2
打开caffe文件夹内的构建文件夹并删除所有先前生成的文件。
步骤#3
Python 3.6不受正式支持,Python 3.5有一些具有挑战性的问题。对于初学者,我建议直接安装Python 2.7。
Install anaconda 2.7 [Anaconda 2.7][1]
步骤#4
Execute scripts/build_win.cmd
[1]: https://www.continuum.io/downloads
重新格式化代码以易于阅读