US 11,720,789 B2
Fast nearest neighbor search for output generation of convolutional neural networks
Hessam Bagherinezhad, Seattle, WA (US); and Dmitry Belenko, Redmond, WA (US)
Assigned to Apple Inc., Cupertino, CA (US)
Filed by Apple Inc., Cupertino, CA (US)
Filed on Nov. 1, 2019, as Appl. No. 16/672,352.
Claims priority of provisional application 62/858,911, filed on Jun. 7, 2019.
Prior Publication US 2020/0387783 A1, Dec. 10, 2020
Int. Cl. G06F 16/00 (2019.01); G06N 3/08 (2023.01); G06F 17/16 (2006.01); G06F 16/903 (2019.01); G06N 3/04 (2023.01); G06F 40/30 (2020.01)
CPC G06N 3/08 (2013.01) [G06F 16/90335 (2019.01); G06F 17/16 (2013.01); G06F 40/30 (2020.01); G06N 3/04 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising, by one or more computing systems:
receiving, at a neural network model comprising a plurality of layers, an input vector corresponding to a data item, wherein the plurality of layers comprise a last-layer associated with a mapping matrix;
generating a binary matrix based on the mapping matrix;
generating an integer vector based on the binary matrix and a binary vector associated with the input vector;
identifying, for the integer vector, a plurality of indices corresponding to a plurality of top values of the integer vector;
generating an output vector based on the input vector and a plurality of rows of the mapping matrix, wherein the plurality of rows is associated with the plurality of identified indices, respectively; and
determining, based on the output vector, that the data item is associated with one or more classes.