运行环境
Spyder4.0+Python3.7
来源
https://github.com/dragen1860/Deep-Learning-with-TensorFlow-book。
代码
import tensorflow as tf
assert tf.__version__.startswith('2.')
# 1.创建输入张量
a = tf.constant(2.)
b = tf.constant(4.)
# 2.直接计算并打印
print('a+b=',a+b)
运行结果
![]()
TensorFlow 2.x快速入门
Spyder4.0+Python3.7
https://github.com/dragen1860/Deep-Learning-with-TensorFlow-book。
import tensorflow as tf
assert tf.__version__.startswith('2.')
# 1.创建输入张量
a = tf.constant(2.)
b = tf.constant(4.)
# 2.直接计算并打印
print('a+b=',a+b)
![]()
您可能感兴趣的与本文相关的镜像
TensorFlow-v2.15
TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型
7386
1万+

被折叠的 条评论
为什么被折叠?