This article is a personal summary of the Keras deep Learning framework configuration, the shortcomings please point out, thank you!
1. First, we need to install the Ubuntu operating system (under Windows) , which uses the Ubuntu16.04 version:
2. After installing the Ubuntu16.04, the system needs to be initialized and updated:
Open Terminal input:
System Upgrade:
→~ sudo apt-get update
→~ sudo apt-get upgrade
To install a base Dependent library:
→~ sudo apt-get install python-dev python-pip python-nose gcc g++ git gfortran libopenblas-dev liblapack-dev libatlas-base -dev
→~ sudo apt-get install setuptools wheel python-numpy python-scipy python-matplotlib
3. Installing the CUDA development environment
Download CUDA8.0:
Open the terminal and switch to the download directory:
→~ sudo dpkg-i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
→~ sudo apt-get update
→~ sudo apt-get install Cuda
After the installation is complete, configure the Cuda path:
→~ sudo gedit/etc/profile
Enter add at the end of the profile file ( Note: If you are not using version 8.0, you need to modify the version number ):
→~ Export cuda_home=/usr/local/cuda-8.0
→~ Export Path=/usr/local/cuda-8.0/bin${path:+:${path}}
→~ Export Ld_library_path=/usr/local/cuda-8.0/lib64${ld_library_path:+:${ld_library_path}}
After modification:
→~ Source/etc/profile
Verify that the configuration is successful:
→~ nvcc-v
The following message appears to be successful:
4. Installing the CUDNN Acceleration Library
This article uses the CUDA8.0, the corresponding installation cudnn-8.0-linux-x64-v6.0.tgz. Download extracted is a folder named Cuda, which contains bin, include, Lib, three folders copied to the location of the installation Cuda to overwrite the corresponding folder:
→~ cd/home/..../cudnn/
→~ sudo cp cuda/include/cudnn.h/usr/local/cuda/include
→~ sudo cp cuda/lib64/libcudnn*/usr/local/cuda/lib64
→~ sudo chmod a+r/usr/local/cuda/include/cudnn.h/usr/local/cuda/lib64/libcudnn*
5. Installing the Keras frame
→~ sudo pip install scikit-learn scikit-image
→~ sudo pip install TENSORFLOW-GPU # GPU Accelerated version
→~ sudo pip install Keras
Verify that the installation was successful in the terminal:
→~ Import TensorFlow
→~ Import Keras
If you do not error, the configuration is successful!
Keras Learning Environment Configuration-gpu accelerated version (Ubuntu 16.04 + CUDA8.0 + cuDNN6.0 + tensorflow)