miniconda3 安裝tensorflow

  • 使用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信息code

os.environ["TF_CPP_MIN_LOG_LEVEL"]='3'
相關文章
相關標籤/搜索