Tensorflow-GPU 1.15安装

TensorFlow-GPU安装命令

conda create -n YourName python=3.6
conda activate YourName 
pip install tensorflow-gpu==1.15.0 -i https://pypi.douban.com/simple/
conda install cudatoolkit=10.0
conda install -c anaconda cudnn

测试

import tensorflow as tf
print('GPU',tf.test.is_gpu_available())
print(tf.__version__)
a = tf.constant(2.)
b = tf.constant(4.)
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
print(a * b)

你可能感兴趣的:(tensorflow,python,深度学习)