tf.decode_raw
tf.decode_raw
tf.decode_raw
decode_raw( bytes, out_type, little_endian=None, name=None )
Defined in tensorflow/python/ops/gen_parsing_ops.py
.
See the guide: Inputs and Readers > Converting
Reinterpret the bytes of a string as a vector of numbers.
Args:
-
bytes
: ATensor
of typestring
. All the elements must have the same length. -
out_type
: Atf.DType
from:tf.half, tf.float32, tf.float64, tf.int32, tf.uint8, tf.int16, tf.int8, tf.int64
. -
little_endian
: An optionalbool
. Defaults toTrue
. Whether the inputbytes
are in little-endian order. Ignored forout_type
values that are stored in a single byte likeuint8
. -
name
: A name for the operation (optional).
Returns:
A Tensor
of type out_type
. A Tensor with one more dimension than the input bytes
. The added dimension will have size equal to the length of the elements of bytes
divided by the number of bytes to represent out_type
.
© 2017 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