Install Keras and Tensorflow-gpu on WINDOWS10

Source: Internet
Author: User
Tags virtual environment keras

Installation Environment:
    • Windows 64bit
    • Gpu:geforce GT 720
    • python:3.5.3
    • Cuda:8

  1. First download the Anaconda3 version of Win10 64bit and install the Python3.5 release. Because currently TensorFlow only supports Python3.5 for Windows. You can download the Anaconda installation package directly, there is no problem. (Tsinghua Mirror https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/)
  2. There are two versions of TensorFlow:CPU version and GPU version. The GPU version requires CUDA and CuDNN support, and the CPU version is not required. If you want to install the GPU version, make sure your video card supports CUDA first. I installed the GPU version, using the pip installation , so in the case of GPU installation, the CPU version simply does not need to install CUDA and CuDNN. Detailed records are documented in reference 1).
  3. Installing the Cuda installation components in cuda8.0 (Https://developer.nvidia.com/cuda-downloads) (2) found that the installation package itself included a 369.30 version of the graphics driver during the installation of Cuda. Then this version should be a driver that matches CUDA8 with each other. )
  4. Install cudnn5.1 (HTTPS://DEVELOPER.NVIDIA.COM/CUDNN) unzip the installation package just down, copy the files under these three folders to the Cuda folder below.
  5. After the Anaconda installation is complete, you should be able to see whether the version is 3.5 by tapping Python directly in the Windows Command window.
  6. Create a TensorFlow virtual environment c:> Conda create-n TensorFlow python=3.5, everything in the future needs to be done in this virtual environment, including the installation of various packages and Keras
  7. Activating the virtual environment C:> activate TensorFlow
  8. To install the GPU version of TensorFlow, enter the following command (on a):(TensorFlow) c:> pip Install-- ignore-installed--upgrade Https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_ Gpu-1.2.0-cp35-cp35m-win_amd64.whl
  9. Install Keras in TensorFlow virtual environment, PIP install Keras
  10. Error, installation scipy failed, can only be installed separately scipy
  11. Using the PIP list to see which packages are not successfully installed, the result is a lack of scipy, this step seems keras need to install a few packages including numpy and wheel, error scipy installation failed
  12. Still inside the TensorFlow virtual environment, enter Python as
  13. Enter import Pip and print (pip.pep425tags.get_supported ()) to see the dependencies of the package
  14. Find the corresponding WHL file on www.lfd.uci.edu/%7Egohlke/pythonlibs/, download it locally, note the dependency information, cp35,cp35,mwin_amd64 find the corresponding file at the above URL: numpy-1.13.0+ MKL-CP35-CP35M-WIN_AMD64.WHL and SCIPY-0.19.0-CP35-CP35M-WIN_AMD64.WHL
  15. Even if you have previously installed NumPy, please find the NUMPY+MKL WHL from this page and download it locally, because the focus is on MKL rather than numpy.
  16. Copy two packets to the current path, as the author copies to the C:\Users\Alexander folder
  17. Install these two files,

  18. And then we can install Keras.

  19. Test it:

  20. Then test the TensorFlow, and use the official website on the line.

    Invoke python from your shell as follows:

    $ python
    Enter the following short program inside the python interactive shell:

    >>> Import TensorFlow as TF
    >>> Hello = tf.constant (' Hello, tensorflow! ')
    >>> sess = tf. Session ()
    >>> Print (Sess.run (hello))
    If the system outputs the following, then your is ready to begin writing TensorFlow programs:

    Hello, tensorflow!.

These commands also need to be run in the TensorFlow virtual environment.

The next step is to test the mnist data set.

1) https://www.tensorflow.org/install/install_windows

2) http://blog.csdn.net/infovisthinker/article/details/54705826

3) http://jingyan.baidu.com/article/ca41422f27c56a1eae99ed39.html

4) https://keras.io/

There are several also reference

Http://www.cnblogs.com/lyy-totoro/p/6433626.html

http://blog.csdn.net/sb19931201/article/details/53648615

Http://developer2.download.nvidia.com/compute/machine-learning/cudnn/secure/v5.1/prod/doc/cudnn_install.txt? Ub-muhp4jas6zsewlt7it5aideb9zkbl3tz10b2coenvncbdm9lpzmv00tyavz7ayjzt_jh93r9uf5qmp9afmlrlgzpm_ fbex-1wmnmam3-aeytyjn2gaiq8vbjfzqybbqzzquhfhggvpifkrqdaicfkzwuur9inbewtf26jqooinz56

Http://www.tensorfly.cn/tfdoc/get_started/introduction.html

Install Keras and Tensorflow-gpu on WINDOWS10

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.