oa::FnMatrix::vqAssign
vqAssign: vector-quantization nearest-code assignment (VQ-VAE codebook lookup). inZe: [N, D] latents. inCodebook: [K, D] codes. Returns the per-row argmin index (int32 [N]) and the gathered winning code (float [N, D]) by squared L2 distance.
Function Documentation
vqAssign: vector-quantization nearest-code assignment (VQ-VAE codebook lookup). inZe: [N, D] latents. inCodebook: [K, D] codes. Returns the per-row argmin index (int32 [N]) and the gathered winning code (float [N, D]) by squared L2 distance.
Parameters
inZeconst Matrix &—
inCodebookconst Matrix &—
Returns
VqAssignResultThe declared return value.