def classes

bendtorch-core@0.1.0.0 · src/autograd/loss.bend:278

import bendtorch-core@0.1.0.0/src/autograd/loss.bend as Loss
import Base

278# The class numbers 0.0, 1.0, ... of `fuel` columns from `next`.
279def classes(fuel: Nat, +next: Nat) -> List<&2, F32>:
280  match fuel:
281    case 0n:
282      Nil{}
283    case 1n+remaining:
284      count_f32(next) <> classes(remaining, 1n+next)

Uses (4)

Used by (1)