DriftTexture · function
softmax
Each row of x to a distribution, stably: the row's largest value is subtracted before the
exponential, so logits near a thousand give their logistic rather than Infinity / Infinity.
Explained in DriftTexture.
function softmax(x: Float32Array, rows: number, cols: number, out: Float32Array): voidimport { softmax } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
x | Float32Array | |
rows | number | |
cols | number | |
out | Float32Array |