TensorFlow程序 简单输出程序
"""
TensorFlow程序 简单输出程序
"""
from __future__ import print_function
# 导入tensorflow的包
import tensorflow as tf
# try except
try:
tf.contrib.eager.enable_eager_execution()
except ValueError:
pass
# 输出结果
tensor = tf.constant('Gxs every day')
print('tensor:')
print(tensor)
print('输出:')
# 将tensor 转换成 numpy 形式输出
tensor_value = tensor.numpy()
print(tensor_value)