- 使用miniconda3進行安裝
conda create -n tensorflow
conda install tensorflow
輸入下面的代碼進行測試
import tensorflow as tf
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"]='3'
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
關閉warning信息使用下面的代碼,不然會出現一些warning信息
os.environ["TF_CPP_MIN_LOG_LEVEL"]='3'