TensorFlow函數(shù)教程:tf.io.decode_raw

2019-02-18 16:49 更新

tf.io.decode_raw函數(shù)

別名:

  • tf.decode_raw
  • tf.io.decode_raw
tf.io.decode_raw(
    bytes,
    out_type,
    little_endian=True,
    name=None
)

在生成的文件中定義:tensorflow/python/ops/gen_parsing_ops.py。

將字符串的字節(jié)重新解釋為數(shù)字向量。

參數(shù):

  • bytes:一個string類型的Tensor。所有元素必須具有相同的長度。
  • out_type:tf.DType,可以是:tf.half, tf.float32, tf.float64, tf.int32, tf.uint16, tf.uint8, tf.int16, tf.int8, tf.int64。
  • little_endian:可選的bool。默認為True。輸入bytes是否以little-endian順序排列。忽略存儲在單個字節(jié)(如 uint8)中的out_type值。
  • name:操作的名稱(可選)。

返回:

一個out_type類型的Tensor。

以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號