U
- data type for output
outputpublic final class UpperBound<U extends TNumber> extends RawOp implements Operand<U>
np.searchsorted(sorted_inputs, values, side='right')
.
The result is not a global index to the entire
Tensor
, but rather just the index in the last dimension.
A 2-D example: sorted_sequence = [[0, 3, 9, 9, 10], [1, 2, 3, 4, 5]] values = [[2, 4, 9], [0, 2, 6]]
result = UpperBound(sorted_sequence, values)
result == [[1, 2, 4], [0, 2, 5]]
Modifier and Type | Class and Description |
---|---|
static class |
UpperBound.Inputs<T extends TType> |
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME
The name of this op, as known by TensorFlow core engine
|
Constructor and Description |
---|
UpperBound(Operation operation) |
Modifier and Type | Method and Description |
---|---|
Output<U> |
asOutput()
Returns the symbolic handle of the tensor.
|
static <T extends TType> |
create(Scope scope,
Operand<T> sortedInputs,
Operand<T> values)
Factory method to create a class wrapping a new UpperBound operation, with the default output types.
|
static <U extends TNumber,T extends TType> |
create(Scope scope,
Operand<T> sortedInputs,
Operand<T> values,
Class<U> outType)
Factory method to create a class wrapping a new UpperBound operation.
|
Output<U> |
output()
Gets output.
|
public static final String OP_NAME
public UpperBound(Operation operation)
@Endpoint(describeByClass=true) public static <U extends TNumber,T extends TType> UpperBound<U> create(Scope scope, Operand<T> sortedInputs, Operand<T> values, Class<U> outType)
U
- data type for UpperBound
output and operandsT
- data type for UpperBound
output and operandsscope
- current scopesortedInputs
- 2-D Tensor where each row is ordered.values
- 2-D Tensor with the same numbers of rows as sorted_search_values
. Contains
the values that will be searched for in sorted_search_values
.outType
- The value of the outType attribute@Endpoint(describeByClass=true) public static <T extends TType> UpperBound<TInt32> create(Scope scope, Operand<T> sortedInputs, Operand<T> values)
T
- data type for UpperBound
output and operandsscope
- current scopesortedInputs
- 2-D Tensor where each row is ordered.values
- 2-D Tensor with the same numbers of rows as sorted_search_values
. Contains
the values that will be searched for in sorted_search_values
.public Output<U> output()
Tensor
with the same shape as values
. It contains the last scalar index
into the last dimension where values can be inserted without changing the
ordered property.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.