def one_hot_rows_go

mlbend-preprocess@0.1.0.0 · main.bend:259

import mlbend-preprocess@0.1.0.0/main.bend as MlbendPreprocess
import Base

259# The rows of a one-hot matrix, label by label.
260def one_hot_rows_go(+labels: List<&2, Nat>, +k: Nat, +acc: List<&2, List<&2, F32>>) ->
261  List<&2, List<&2, F32>>:
262  match labels:
263    case Nil{}:
264      acc
265    case Con{h, t}:
266      one_hot_rows_go(t, k, List.append(&2, List<&2, F32>, acc, Con{one_hot_row(h, k), Nil{}}))

Uses (5)

Used by (1)