0

install keras + tensorflow (GPU) to Windows using anaconda

  1. Install Tensorflow and Keras
    1. Run Anaconda Prompt
    2. Install Tensorflow
      # pip install tensorflow-gpu
    3. Install Keras
      # pip install keras
  2. (Optional) Change Keras’ backend from Theano to TensorFlow
    1. This step is optional if Keras uses Theano as its backend.
    2. Start python and import keras
      # python
      # import keras
    3. If Theano is set as the backend, the terminal says “Using Theano backend
    4. Find the setting file location
      1. Find the location of Keras’ setting file. Executing the following 2 lines, the terminal shows the location where the Keras’ setting file is stored.
        # import os
        # print(os.path.expanduser(‘~’))
        NAME_OF_DIRECTORY (in my case it’s C:\User\USERNAME)
    5. Change the backend
      1. Open NAME_OF_DIRECTORY.keras\keras.json
      2. Change  “th” to “tf
      3. Change “theano” to “tensorflow
  3. run any Keras example
0

Visual Studio 2015 with CMake

right after you installed visual studio 2015, CMake cannot find C and C++ compiler of it because Visual Studio 2015 installer didn’t install any compiler. Although I have no ideas this is due to default or my install setting, I found the solution.

Open Visual Studio 2015 and create a new project using C or C++ so that FXXX Visual Studio asks you whether you install the compiler or not.