tf.cast(ndarray,dtype)

转化为指定的类型,一般是将bool类型转化为其他的数据类型,例如:tf.float32

原文地址:https://www.cnblogs.com/pacino12134/p/10131871.html