Encodes each input in value
.
tfc.ops.entropy_encode_channel(
handle, value, name=None
)
In general, entropy encoders in handle
reference multiple distributions.
The last (innermost) dimension of value
determines which distribution is used
to encode value
. For example, if value
is a 3-D array, then value(i,j,k)
is encoded using the k
-th distribution.
handle
controls the number of coding streams. Suppose that value
has the
shape [2, 3, 4]
and that handle
has shape [2]
. Then the first slice
[0, :, :]
of shape [3, 4]
is encoded into handle[0]
and the second
slice [1, :, :]
is encoded into handle[1]
. If handle
has shape []
, then
there is only one handle, and the entire input is encoded into a single stream.
Values must be in the provided ranges specified when the input handle
was
originally created, unless overflow functionality was enabled. The handle
may
be produced by the CreateRangeEncoder
op, or may be passed through from a
different EntropyEncodeChannel/EntropyEncodeIndex
op.
Because the op modifies handle
, the corresponding input edge to the op nodes
of this type should not have other consumers in the graph.
Args | |
---|---|
handle
|
A Tensor of type variant .
|
value
|
A Tensor . Must be one of the following types: int32 .
|
name
|
A name for the operation (optional). |
Returns | |
---|---|
A Tensor of type variant .
|