MlbendPreprocess.l2_normalize: def of mlbend-preprocess@0.1.0.0 Import: import mlbend-preprocess@0.1.0.0/main.bend as MlbendPreprocess Lines 188-190 of mlbend-preprocess@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-preprocess@0.1.0.0/main.bend&start_line=188&end_line=190 import Base import bend-ml-tensor@0.1.0.0/main.bend as T # The L2 normaliser: every row divided by the length of its arrow. def l2_normalize(+r: Nat, +c: Nat, +a: T.Mat) -> T.Mat: mat_of(r, c, l2_normalize_go(T.Mat.to_rows(r, c, a), Nil{})) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor@0.1.2.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor@0.1.2.0/main.bend&name=Mat.to_rows https://jend.leeeet.dev/definition.txt?path=mlbend-preprocess@0.1.0.0/main.bend&name=l2_normalize_go https://jend.leeeet.dev/definition.txt?path=mlbend-preprocess@0.1.0.0/main.bend&name=mat_of