DriftTexture · function
evalNetwork
Evaluate the network, writing shape.outputs values into out.
Explained in DriftTexture.
function evalNetwork(shape: NetworkShape, weights: Float32Array, input: Float32Array, out: Float32Array, scratch: Float32Array): voidimport { evalNetwork } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
shape | NetworkShape | |
weights | Float32Array | |
input | Float32Array | |
out | Float32Array | |
scratch | Float32Array |
In depth
Weights are read in layer order: for each layer, the weight matrix row-major by output, then the
biases. scratch must hold at least twice the widest layer and is reused across calls so this
allocates nothing.