W3cubDocs

/TensorFlow Python

tf.decode_raw

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

Defined in tensorflow/python/ops/gen_parsing_ops.py.

See the guides: Inputs and Readers > Converting, Reading data > QueueRunner, Strings > Conversion

Reinterpret the bytes of a string as a vector of numbers.

Args:

  • bytes: A Tensor of type string. All the elements must have the same length.
  • out_type: A tf.DType from: tf.half, tf.float32, tf.float64, tf.int32, tf.uint16, tf.uint8, tf.int16, tf.int8, tf.int64.
  • little_endian: An optional bool. Defaults to True. Whether the input bytes are in little-endian order. Ignored for out_type values that are stored in a single byte like uint8.
  • name: A name for the operation (optional).

Returns:

A Tensor of type out_type.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/decode_raw