def l2_norm_go

mlbend-preprocess@0.1.0.0 · main.bend:151

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

151# The length of a row, cell by cell.
152def l2_norm_go(acc: List<&2, F32>, +acc_sum: F32) -> F32:
153  match acc:
154    case Nil{}:
155      F32.sqrt(acc_sum)
156    case Con{+h, t}:
157      l2_norm_go(t, F32.add(acc_sum, F32.mul(h, h)))

Uses (5)

Used by (1)