
代码示例如下:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
a = tf.constant(6)
b = tf.constant([1,2,3])
a1 = tf.to_float(a,name='ToFloat')
b1 = tf.cast(b,dtype = tf.float32)
with tf.Session() as session:
print(session.run(a1))
print(session.run(b1))















![[C++ 网络协议] 重叠I/O模型](https://img-blog.csdnimg.cn/a723a4876df24814b91270cb2416af0f.png)


![MyBatis-Plus通用Service快速实现赠三改查[MyBatis-Plus系列] - 第489篇](https://img-blog.csdnimg.cn/img_convert/a7a8034d824f7b26377535152198926f.png)

