短小精悍算例:用TensorFlow实现Hello World

TensorFlow实现Hello world:
(可以通过cmd中pip install tensorflow安装需要的TensorFlow框架)

import tensorflow as tf     #加载
message = tf.constant('Hello World!')  
with tf.Session() as sess:
    print(sess.run(message).decode())    #不sess.run一下不出结果

输出结果(警告内容可忽略):
v差分

猜你喜欢

转载自blog.csdn.net/weixin_39464400/article/details/105909198