def list.softmax

bend-ml-llama@0.2.1.0 · main.bend:353

import bend-ml-llama@0.2.1.0/main.bend as BendMlLlama
import Base

353# stable softmax: subtracts the maximum before exponentiating
354def list.softmax(+xs: List<&2, F32>) -> List<&2, F32>:
355  list.softmax.fin(list.exp_shift(xs, list.max(xs)))

Uses (5)

Used by (1)