Install Keras (TensorFlow do back end)

Source: Internet
Author: User
Tags json virtual environment theano keras

In the previous TensorFlow Exercise 1 I mentioned a high-level library using TensorFlow as the backend, called Keras, which is a high-level neural network Python library. In TensorFlow Exercise 1, I was manually defining a neural network, with a few lines of code to take care of it.

The first Keras use Theano as the back end, TensorFlow after the fire, Keras added TensorFlow support Keras source code: Https://github.com/fchollet/keras How to master deep learning through Keras: http://blog.csdn.net/jdbc/article/details/71933555
Keras Document: Https://keras.io Another package TensorFlow's advanced library-tflearn:https://github.com/tflearn/tflearn keras Chinese online:/http Keras-cn.readthedocs.io/en/latest/tensorflow Chinese document online: http://www.tensorfly.cn/deep learning Framework Keras installation: http://blog.csdn.net/ u012556077/article/details/50364640 Windows environment Keras Deep Learning Framework Configuration: http://blog.csdn.net/zhengjia0826/article/details/ 52571686 Deep Learning Framework Keras experience: http://blog.csdn.net/xjcvip007/article/details/52801216

this post records the steps to install Keras and uses TensorFlow to do the backend. (The system used is Ubuntu, see detailed configuration information). #1 Create a virtual environment

In order to keep the Python development environment tidy, virtual environments are essential.

First create a virtual environment:

Mkvirtualenv KERAS_TF  #--python=python2.7 Specifies the python version used
Workon KERAS_TF
#2 Installing TensorFlowUbuntu 16.04 Installation TensorFlow (GPU support)
Pip Install--upgrade <tensorflow_url>

#3 Installing Keras

Pip install numpy scipy
pip install scikit-learn
pip install Pillow
pip install h5py
pip install Keras
Perform:
Python
>>> Import Keras
To edit a configuration file Keras.json:
~/.keras/keras.json
Make sure the content is:
{
    "image_dim_ordering": "TF", 
    "epsilon": 1e-07, 
    "Floatx": "float32", 
    "backend": "TensorFlow"
}
Image_dim_ordering:tensorflow is using the numpy array (height, width, depth). If you use Theano, the array representation method (depth, height, width).

If you are installing OPENCV, see: Ubuntu 16.04 Compiling and installing OpenCV (Python)

Reprinted from: http://blog.topspeedsnail.com/archives/10427



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.