……

代码实现:

import tensorflow as tf
assert tf.__version__.startswith('2.')
a=tf.constant(2.)
b=tf.constant(4.)
print(f'{a}+{b}={a+b}')

执行结果:

 

 posted on 2020-06-16 15:51  大码王  阅读(206)  评论(0编辑  收藏  举报
复制代码