DriftTexture · function
patchEmbed
A patch embedding: a convolution with stride and kernel both patch, written token-major —
out[tokens][dim], tokens row by row — which is the order a transformer reads them in.
Explained in DriftTexture.
function patchEmbed(out: Float32Array, image: Float32Array, cin: number, h: number, w: number, weight: Float32Array, bias: Float32Array | null, dim: number, patch: number): voidimport { patchEmbed } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
out | Float32Array | |
image | Float32Array | |
cin | number | |
h | number | |
w | number | |
weight | Float32Array | |
bias | Float32Array | null | |
dim | number | |
patch | number |