zhtook

1、测试TensorFlow是否安装成功

python

import tensorflow as tf

hello=tf.constant(\'hello,world\')

sess=tf.Session()

print(sess.run(hello))

结果会输出,如下图所示

2、TensorFlow的入门代码:简单的加法运算

import tensorflow as tf

x=tf.constant(1)

y=tf.constant(2)

z=x+y

sess=tf.Session()

print(sess.run(z))

结果会输出,如下图所示

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-05-10
  • 2021-09-01
  • 2022-12-23
  • 2021-11-18
  • 2021-11-30
  • 2021-04-28
  • 2022-12-23
猜你喜欢
  • 2021-07-11
  • 2021-08-13
  • 2021-11-18
  • 2021-04-22
  • 2021-06-29
  • 2021-11-18
  • 2021-10-13
相关资源
相似解决方案