tf.raw_ops.NearestNeighbors
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Selects the k nearest centers for each point.
tf.raw_ops.NearestNeighbors(
points, centers, k, name=None
)
Rows of points are assumed to be input points. Rows of centers are assumed to be
the list of candidate centers. For each point, the k centers that have least L2
distance to it are computed.
Args |
points
|
A Tensor of type float32.
Matrix of shape (n, d). Rows are assumed to be input points.
|
centers
|
A Tensor of type float32.
Matrix of shape (m, d). Rows are assumed to be centers.
|
k
|
A Tensor of type int64.
Number of nearest centers to return for each point. If k is larger than m, then
only m centers are returned.
|
name
|
A name for the operation (optional).
|
Returns |
A tuple of Tensor objects (nearest_center_indices, nearest_center_distances).
|
nearest_center_indices
|
A Tensor of type int64.
|
nearest_center_distances
|
A Tensor of type float32.
|
如未另行说明,则本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。如需了解详情,请参阅 Google Developers 网站政策。Java 是 Oracle 和/或其关联公司的注册商标。某些内容已根据 Numpy 许可获得了许可。
最后更新时间 (UTC):2024-04-26。
[null,null,["最后更新时间 (UTC):2024-04-26。"],[],[]]