Tensorflow中張量數據類型的轉換

字符串轉爲數字: tf.string_to_number (string_tensor, out_type=None, name=None) 轉爲64位浮點類型–float64: tf.to_double(x, name=’ToDouble’) 轉爲32位浮點類型–float32: tf.to_float(x, name=’ToFloat’) 轉爲32位整型–int32: tf.to_int32(
相關文章
相關標籤/搜索