Install Caffe with Visual Studio 2015 and Cuda 8.0 on windows

7,371 views
Skip to first unread message

Ling

unread,
Sep 1, 2016, 11:54:44 AM9/1/16
to Caffe Users
Hi, 

Is there anybody ever install Caffe on Window 10 with installing Visual Studio 2015 and Cuda 8.0 ?


Daniel Moodie

unread,
Sep 2, 2016, 11:17:50 AM9/2/16
to Caffe Users
I've done it on Windows 7 with VS2015 and CUDA 8.0.

Dependencies:

CMake version of caffe compatible with windows:

Ling

unread,
Sep 13, 2016, 4:02:10 PM9/13/16
to Caffe Users
Thank you!

aqh...@gmail.com

unread,
Dec 5, 2016, 3:54:35 AM12/5/16
to Caffe Users

Hi, Do you have the instruction about how to use your link ? Thank you very much!


在 2016年9月2日星期五 UTC+8下午11:17:50,Daniel Moodie写道:

nila...@gmail.com

unread,
Dec 5, 2016, 4:43:27 AM12/5/16
to Caffe Users
I suggest to use the windows branch from the official caffe repository https://github.com/BVLC/caffe/tree/windows . I can confirm that it does work with vs 2015 and cuda 8, it however lacks the matlab interface.

Shan E Ahmed Raza

unread,
Dec 13, 2016, 4:08:41 PM12/13/16
to Caffe Users
Hi can anyone list steps to compile caffe for windows?

I followed step by step guide on https://github.com/BVLC/caffe/tree/windows, with different options and compiled but couldn't get caffe.exe and couldn't import caffe in python

git clone https://github.com/BVLC/caffe.git
cd caffe
git checkout windows
:: Added path to Python directory on my machine and added -DCUDNN_ROOT=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0 ^ where I have copied cuDNN in CUDA directory.
scripts\build_win.cmd 
call build\libraries\prependpath.bat
% It compiles successfully but I cannot see anything caffe.exe anywhere and can't import in python
I even tried to compile using Visual Studio but didn't work.

Z.myd

unread,
Dec 14, 2016, 12:22:08 AM12/14/16
to Caffe Users
Hi, 
I have exactly the same problem. Can anyone help? 

Huck Wach

unread,
Jan 2, 2017, 3:51:55 PM1/2/17
to Caffe Users
I too have same issue.  I am NOT using CUDA though.  I'll also not that although I had no build errors there were 577 warnings!!

INFO: ============================================================
INFO: Summary:
INFO: ============================================================
INFO: MSVC_VERSION               = 14
INFO: WITH_NINJA                 = 0
INFO: CMAKE_GENERATOR            = "Visual Studio 14 2015 Win64"
INFO: CPU_ONLY                   = 1
INFO: CMAKE_CONFIG               = Release
INFO: CMAKE_BUILD_SHARED_LIBS    = 0
INFO: BUILD_PYTHON               = 1
INFO: BUILD_PYTHON_LAYER         = 1
INFO: BUILD_MATLAB               = 0
INFO: PYTHON_EXE                 = "python"
INFO: RUN_TESTS                  = 0
INFO: RUN_LINT                   = 0
INFO: RUN_INSTALL                = 0
INFO: ============================================================


    577 Warning(s)
    0 Error(s)

Time Elapsed 00:06:02.84

Huck Wach

unread,
Jan 2, 2017, 4:26:36 PM1/2/17
to Caffe Users
I am trying to use Caffe in my own C++ project which resembles the cpp_classification example.  When I include caffe.hpp I encountered many errors related to not finding include files but seemed to be able to get through those by modifying my project include directories (I needed things in caffe/include/caffe , caffe/build/include/caffe/proto, caffe/build/libraries/include and  caffe\build\libraries\include\boost-1_61 .  

However, now I get a ton of build errors in proto/caffe.pb.h which is included by common.hpp which is included by caffe.hpp (the one and only caffe related include I'm using in my code).  The first of the errors is on this line...

float min() const;

which gives an error "invalid type for a bit field"

Any ideas?

Liila Torabi

unread,
Mar 29, 2017, 4:02:12 PM3/29/17
to Caffe Users
Hi Daniel,

I am trying to build this with VS2013, and I am having some trouble with the leveldb that I have, I think maybe is not the right version. Could you post a link to the source of the correct version of leveldb so that I can build it in vs2013? thanks


On Friday, September 2, 2016 at 11:17:50 AM UTC-4, Daniel Moodie wrote:

Liila Torabi

unread,
Mar 30, 2017, 9:36:54 AM3/30/17
to Caffe Users
I found the version is 1.2, is there any clean way to build it in windows?
Thanks,
Liila

Liila Torabi

unread,
Mar 30, 2017, 2:22:47 PM3/30/17
to Caffe Users

I can now compile it in windows, but my version is a bit different from yours, although they are both 1.2. Would you please post a link to you leveldb source
Thanks,
Liila

nida Khan

unread,
Apr 16, 2017, 8:42:14 PM4/16/17
to Caffe Users
Hi
I have followed your instructions from youtube tutorial on my windows10 caffee and cuda 7. but its failed to compile on my system. Any suggestions to compile it for matlab wrapper.
kind regards

Vadzim Piatrou

unread,
May 17, 2017, 6:30:14 AM5/17/17
to Caffe Users
I solve this problem using NOMINMAX flag in project. This flag prevents using min definition in 'minwindef.h' file.

вторник, 3 января 2017 г., 0:26:36 UTC+3 пользователь Huck Wach написал:

Vincent Wen

unread,
Aug 11, 2017, 1:38:05 PM8/11/17
to Caffe Users
I ran into exact same issue. Have you figure out the problem?

Vincent Wen

unread,
Aug 11, 2017, 1:54:22 PM8/11/17
to Caffe Users
I figured out the problem. Apparently caffe.exe exists in build\tools\Release\caffe.exe
Reply all
Reply to author
Forward
0 new messages