DriftCapture · function

samGridPositions

[grid · grid, dim]: the position of each cell of the embedding's grid, at its centre, as the upstream's get_dense_pe lays it out and the decoder reads it as tokens.

Explained in DriftCapture.

function samGridPositions(gaussian: Float32Array, dim: number, grid: number): Float32Array
import { samGridPositions } from '@driftengine/capture';

Parameters

ParameterTypeDescription
gaussianFloat32Array
dimnumber
gridnumber