@mgarrus and @Estiui here are the steps I did for my 64-bit Win7 with GTX 960 setup:
-
Install the CUDA (CUDA Toolkit 12.6 Update 1 Downloads | NVIDIA Developer and http://developer.download.nvidia.com/compute/cuda/8.0/secure/Prod2/docs/sidebar/CUDA_Installation_Guide_Windows.pdf?autho=1490095075_48e6262b0ee4aeac8867553c5d25475a&file=CUDA_Installation_Guide_Windows.pdf).
-
Then install CuDNN (CUDA Deep Neural Network (cuDNN) | NVIDIA Developer).
-
Install Anaconda on your machine…
Now you want to create a GPU environment for Tensorflow and install all these packages into it (and any other packages you want to use):
- conda create --name tensorflow-gpu python=3.5
- activate tensorflow-gpu
- conda install jupyter
- conda install scipy
- conda install matplotlib
- conda install pandas
- conda install scikit-learn
- conda install numpy
- conda install keras
- conda install pillow
- conda install bcolz
- conda install h5py
- pip install tensorflow-gpu
Note that you HAVE to use Anaconda Python 3.5… Tensorflow will only work with that specific version on Windows (not 2.7, not 3.6).
Whenever you want to use your new setup, pull up a Windows command prompt, and type this into it:
- activate tensorflow-gpu
Change to whatever directory you want, then ‘jupyter notebook’ to start up Jupyter. It will automatically open a browser window in your default browser.
A few things to note:
- Tensorflow uses different dimension ordering than Theano:
For 2D data (e.g. image), "tf" assumes (rows, cols, channels) while "th" assumes (channels, rows, cols). For 3D data, "tf" assumes (conv_dim1, conv_dim2, conv_dim3, channels) while "th" assumes (channels, conv_dim1, conv_dim2, conv_dim3).
- An alternate “quick and dirty” kludge for the class notebooks is to just specify “th” ordering in the keras.json file (in the .keras directory):
{
“image_dim_ordering”: “th”,
“epsilon”: 1e-07,
“floatx”: “float32”,
“backend”: “tensorflow”
}
- There are a few things you need to change for Python 3.5 – such as cPickle becomes _Pickle… I don’t remember what they all were, but it something worked in 2.7 but you get an error in 3.5, that’s likely to be the problem.
I’m trying to remember if I missed anything… but this is basically what I did. I hope this helps!
Christina