tfc.ops.entropy_decode_index | TensorFlow v2.16.1 (original) (raw)
tfc.ops.entropy_decode_index
Stay organized with collections Save and categorize content based on your preferences.
Decodes the encoded stream inside handle
.
View aliases
Main aliases
tfc.ops.entropy_decode_index(
handle, index, shape, Tdecoded, name=None
)
The output shape is defined as handle.shape + MakeShape(shape)
, and therefore both handle
and shape
arguments determine how many symbols are decoded.
Like encoders, decoders in handle
reference multiple distributions. index
indicates which distribution should be used to decode each value in the output. For example, if decoded
is a 3-D array, then output(i,j,k)
is decoded using the index(i,j,k)
-th distribution. In general, index
should match the index
of the corresponding EntropyEncodeIndex
op. index
should have the same shape as output decoded
: handle.shape + MakeShape(shape)
.
handle
controls the number of coding streams. Suppose that index
has the shape [2, 3, 4]
and that handle
has shape [2]
. Then the first output slice[0, :, :]
of shape [3, 4]
is decoded from handle[0]
and the second output slice [1, :, :]
is decoded from handle[1]
. If handle
has shape []
, then there is only one handle, and the entire output is decoded from a single stream.
The input handle may be produced by the CreateRangeDecoder
op, or may be passed through from a different EntropyDecode*
op.
This op modifies the input handle
. The handle input edge to the op nodes of this type should not have other consumers in the graph.
Args | |
---|---|
handle | A Tensor of type variant. |
index | A Tensor. Must be one of the following types: int32. |
shape | A Tensor of type int32. |
Tdecoded | A tf.DType from: tf.int32. |
name | A name for the operation (optional). |
Returns | |
---|---|
A tuple of Tensor objects (aliased_handle, decoded). | |
aliased_handle | A Tensor of type variant. |
decoded | A Tensor of type Tdecoded. |