linux installation step keras + tensorflow-gpu

Recently came into contact with deep learning, feel the need to use some blog about the recording pit and solutions usually met.

Recently I downloaded a code from the Internet is keras + tensorflow , the first run python code a little excited, met some of the middle pit, the record about the solution.

The main version keras and tensorflow-gpu does not match the result. For example, there have been mistakes: 'eras.backend' has no attribute 'contro_flow_ops'

1. Create a virtual environment, prevent many frameworks in a home directory in the back too confusing operations: parentheses are explained, when the run command to delete.

conda create -n Ma (virtual environment name) python == 3.6.7 (formerly thought to the environment and python previously installed version corresponds, in fact, is unnecessary, this version can be set according to the code requirements, such as 3.5 or 3.6 may .)

2. Install tensorflow, because the server can use with their own GPU, so here installation tensorflow-gpu version:

conda install tensorflow-gpu==1.12.0

(This step will automatically install cudatoolkit 9.2 and cudnn 7.6.0)

3. Install keras

conda install hardware == 2.2.4

4. Reduce what numpy version

conda == numpy 1.16.0

Guess you like

Origin www.cnblogs.com/iamdongyang/p/11666843.html