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

VqAssignResult oa::FnMatrix::vqAssign( const Matrix & inZe, const Matrix & inCodebook )
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

inZe
const Matrix &

inCodebook
const Matrix &

Returns

VqAssignResult

The declared return value.