U
- data type for output
output@Operator(group="ragged") public final class RaggedBincount<U extends TNumber> extends RawOp implements Operand<U>
size
and the same dtype as weights
. If
weights
are empty, then index i
stores the number of times the value i
is
counted in arr
. If weights
are non-empty, then index i
stores the sum of
the value in weights
at each index where the corresponding value in arr
is
i
.
Values in arr
outside of the range [0, size) are ignored.
Modifier and Type | Class and Description |
---|---|
static class |
RaggedBincount.Inputs<T extends TNumber,U extends TNumber> |
static class |
RaggedBincount.Options
Optional attributes for
RaggedBincount |
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME
The name of this op, as known by TensorFlow core engine
|
Constructor and Description |
---|
RaggedBincount(Operation operation) |
Modifier and Type | Method and Description |
---|---|
Output<U> |
asOutput()
Returns the symbolic handle of the tensor.
|
static RaggedBincount.Options |
binaryOutput(Boolean binaryOutput)
Sets the binaryOutput option.
|
static <U extends TNumber,T extends TNumber> |
create(Scope scope,
Operand<TInt64> splits,
Operand<T> values,
Operand<T> sizeOutput,
Operand<U> weights,
RaggedBincount.Options... options)
Factory method to create a class wrapping a new RaggedBincount operation.
|
Output<U> |
output()
Gets output.
|
public static final String OP_NAME
public RaggedBincount(Operation operation)
@Endpoint(describeByClass=true) public static <U extends TNumber,T extends TNumber> RaggedBincount<U> create(Scope scope, Operand<TInt64> splits, Operand<T> values, Operand<T> sizeOutput, Operand<U> weights, RaggedBincount.Options... options)
U
- data type for RaggedBincount
output and operandsT
- data type for RaggedBincount
output and operandsscope
- current scopesplits
- 1D int64 Tensor
.values
- 2D int Tensor
.sizeOutput
- non-negative int scalar Tensor
.weights
- is an int32, int64, float32, or float64 Tensor
with the same
shape as input
, or a length-0 Tensor
, in which case it acts as all weights
equal to 1.options
- carries optional attribute valuespublic static RaggedBincount.Options binaryOutput(Boolean binaryOutput)
binaryOutput
- bool; Whether the kernel should count the appearance or number of occurrences.public Output<U> output()
Tensor
with length equal to size
or 2D Tensor
with [batch_size, size
].
The counts or summed weights for each value in the range [0, size).public Output<U> asOutput()
Operand
Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput
in interface Operand<U extends TNumber>
OperationBuilder.addInput(Output)
Copyright © 2015–2022. All rights reserved.