Here are my instructions to install Tensorflow (tf) in Windows 7 x64 for Python 3.5. I have verified these instructions work to get tf working with Keras. e sure to update your keras.json file to use the tf backend if you already use theano. You do not need to purchase visual studio to get this to work.
- Install Cuda 8.0. Note, you must use the release version of 8.0 and NOT the release candidate.
- Install python35 to c:\python35 (no need for anaconda)
- Download cudnn (record path)
- Download swig (record path)
- Install visual studio 2015 community edition with C++. Had to manually install c++ in visual studio 2015 community edition. went into control panel, programs and features, and did a modify
- Install git for windows
II. Getting the tf repository
- git clone https://github.com/tensorflow/tensorflow.git
- cd tensorflow\tensorflow\contrib\cmake
- mkdir build
- cd build
III. Begin the tf install
- “C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvarsall.bat” (make sure you are using the amd64 version)
- cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release -DSWIG_EXECUTABLE=d:/swigwin-3.0.10/swig.exe -DPYTHON_EXECUTABLE=c:/python35/python.exe -DPYTHON_LIBRARIES=C:/Python35/libspython35.lib -Dtensorflow_ENABLE_GPU=ON -DCUDNN_HOME=D:/ASASINATR/cudnn -Dtensorflow_ENABLE_GPU=ON
- MSBuild /p:Configuration=Release tf_tutorials_example_trainer.vcxproj
- Release\tf_tutorials_example_trainer.exe (this should work if everything built correctly)
IV. Make the python wheel
- pip install travis pip setuptools wheel
- MSBuild /p:Configuration=Release tf_python_build_pip_package.vcxproj
- pip install D:\tensorflow\tensorflow\tensorflow\contrib\cmake\build\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl
If everything was successful you should be able to modify your keras.json file, load keras in python, and begin using tf.
Thanks to Derek Murray of Google for the help creating this.