public final class NearestNeighbors extends RawOp
Modifier and Type | Class and Description |
---|---|
static class |
NearestNeighbors.Inputs |
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME
The name of this op, as known by TensorFlow core engine
|
Constructor and Description |
---|
NearestNeighbors(Operation operation) |
Modifier and Type | Method and Description |
---|---|
static NearestNeighbors |
create(Scope scope,
Operand<TFloat32> points,
Operand<TFloat32> centers,
Operand<TInt64> k)
Factory method to create a class wrapping a new NearestNeighbors operation.
|
Output<TFloat32> |
nearestCenterDistances()
Gets nearestCenterDistances.
|
Output<TInt64> |
nearestCenterIndices()
Gets nearestCenterIndices.
|
public static final String OP_NAME
public NearestNeighbors(Operation operation)
@Endpoint(describeByClass=true) public static NearestNeighbors create(Scope scope, Operand<TFloat32> points, Operand<TFloat32> centers, Operand<TInt64> k)
scope
- current scopepoints
- Matrix of shape (n, d). Rows are assumed to be input points.centers
- Matrix of shape (m, d). Rows are assumed to be centers.k
- Number of nearest centers to return for each point. If k is larger than m, then
only m centers are returned.public Output<TInt64> nearestCenterIndices()
Copyright © 2015–2022. All rights reserved.