Created
April 6, 2026 12:42
-
-
Save jacobsapps/3e996136811fb2bd21ba89ba0507a222 to your computer and use it in GitHub Desktop.
L2 Normalization with Accelerate from Apple Photos, Face Tagging, and Embeddings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var norm: Float = 0 | |
| vDSP_svesq(embedding, 1, &norm, vDSP_Length(count)) | |
| norm = sqrt(norm) | |
| if norm > 0 { | |
| vDSP_vsdiv(embedding, 1, &norm, &embedding, 1, vDSP_Length(count)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment