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).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[]]