Centos installation and configuration keras version

Source: Internet
Author: User
Tags theano keras

Centos installation and configuration keras version
Centos version:

  1. Install theano

    1.1 download theano's zip file [https://github.com/theano/theano#, decompress it ~ /Site-packages/theano directory and name it theano
    1.2 command line input:

        python setup.py develop
    • Install Keras

      2.1 Download The keras zip file [https://github.com/fchollet/keras.git.pdf, decompress it ~ /Site-packages/keras directory, and name it keras 2.2 command line input:

          python setup.py install
      • Install the g ++ Environment

        On the command line, enter:

            yum install gcc-c++

        In centos, the g ++ installation package name is gcc-c ++.

      • Install other python packages
        sudo yum -y install numpy sudo yum -y install scipy
      • The default backend of keras is tensorflow, which can be converted to theano.

        5.1 open the. keras folder in the/root directory and enter the following command line:

            cd /root/.keras

        Pay special attention to the configuration in the root directory, instead of opening the keras. json file in keras 5.2, and entering in the command line:

            gedit keras.json

        Change "backend": "tensorflow" to "backend": "theano". You can set the backend to switch between theano and tensorflow. keras folder, no keras. json file, which can be created and the written content is:

            {    "image_dim_ordering": "th",     "epsilon": 1e-07,     "floatx": "float32",     "backend": "theano"}

      Notes: Pythonsetup. py install and python setup. difference of py develop: python setup. py install is usually a third-party package python setup. py develop is a package that requires frequent code editing, but does not need to be re-installed. It is very convenient to edit the code to take effect immediately after it is installed in the (virtual) environment.

      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.