@Operator(group="math") public final class PopulationCount extends PrimitiveOp implements Operand<UInt8>
For each entry in `x`, calculates the number of `1` (on) bits in the binary representation of that entry.
NOTE: It is more efficient to first `tf.bitcast` your tensors into `int32` or `int64` and perform the bitcount on the result, than to feed in 8- or 16-bit inputs and then aggregate the resulting counts.
operation
Modifier and Type | Method and Description |
---|---|
Output<UInt8> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T extends Number> |
create(Scope scope,
Operand<T> x)
Factory method to create a class wrapping a new PopulationCount operation.
|
Output<UInt8> |
y() |
equals, hashCode, op, toString
public static <T extends Number> PopulationCount create(Scope scope, Operand<T> x)
scope
- current scopex
- public Output<UInt8> 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<UInt8>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.