tf.cast(x, dtype, name=None)
此函數(shù)是類型轉(zhuǎn)換函數(shù)
參數(shù)
x:輸入
dtype:轉(zhuǎn)換目標(biāo)類型
name:名稱
返回:Tensor
# tensor `a` is [1.8,2.2], dtype=tf.float
tf.cast(a,?tf.int32)?==>?[1,2]??#?dtype=tf.int32
tf.cast(x, dtype, name=None)
此函數(shù)是類型轉(zhuǎn)換函數(shù)
參數(shù)
x:輸入
dtype:轉(zhuǎn)換目標(biāo)類型
name:名稱
返回:Tensor
# tensor `a` is [1.8,2.2], dtype=tf.float
tf.cast(a,?tf.int32)?==>?[1,2]??#?dtype=tf.int32