第一次研究tensorflow。
系统windows7
python版本:3.6.1
tensorflow版本:1.12.0
注意:python和tensorflow版本一定要对应,不然会报错的。
import os
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
hello = tf.constant("Hello TensorFlow")
sess = tf.Session()
print(sess.run(hello))
D:\Python36\python.exe F:/code2019/python/machinelearning/FaceRecognition/tensorflowHello.py
b'Hello TensorFlow'