Record the process of installing keras & tensorflow-gpu on win10

Installation Environment

win10 64bit

python 3.6.12

CUDA &cuDNN can be downloaded and installed according to your own computer situation.

Create a virtual environment:

1. I created python36 here. After the creation is complete, activate the environment, open the Anaconda prompt, and enter conda python36 to activate the environment.
enter

pip install --ignore-installed --upgrade tensorflow-gpu

Insert picture description here

Verify tensorflow-gpu:

Enter python
Insert picture description here
input:

import tensorflow as tf
tf.compat.v1.disable_eager_execution()
hello = tf.constant('Hello, TensorFlow!')
sess = tf.compat.v1.Session()
print(sess.run(hello))

Output result:
Insert picture description here
the installation is successful.

Install keras

Enter in the python36 environment:

pip install keras 

After the installation is complete, enter python and enter import keras.

It is purely to record the learning process, please contact me if there is any infringement.

Guess you like

Origin blog.csdn.net/qq_38233472/article/details/109290526