Refrence Caffe 2 Assuming python is already installed and you've done this step Install within a virtual environment is recommended. So it doesn't pollute your system envrionment, and you can always retry.
- Download Visual Studio 15.4.5 CE, do not download the latest 15.6.X because CUDA 9.1 doesn't support that.
- Launch the VS installer, select development with C++ and also select C++/CLI support and VC++ 2015.3 v140 toolset. DO NOT UNSELECT ANY SELECTED OPTIONS!!!
- Download CUDA 9.1 and cuDNN7.1 from Nvidia, install and patch CUDA if necessary, and then put cnDNN stuff into installation folder as instructed. This step must be performed after step 2 complete.
- Download and Install CMAKE
- Clone the project, it is now a subproject of pyTorch. Use the link: [git clone --recursive https://github.com/pytorch/pytorch.git ](git clone --recursive https://github.com/pytorch/pytorch.git)
- Go to pytorch\scripts. Modify build_windows.bat, for us:
SET USE_CUDA=ON SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
- Open Visual Studio 2017 Prompt(DO NOT open normal cmd!!!)
- Go to the \scripts\
- execute
build_windows.bat
and then you wait (very long time). - The finishing up stuff go Caffe 2 and do it.