Bendtorch.CrossEntropy: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 3247-3250 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=3247&end_line=3250 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def CrossEntropy(+n: Nat, +c: Nat, z: TA.Mat, labels: List<&2, Nat>) -> LossOut>: match z: case TA.Mat{d}: ce_fin(n, c, F32.from_nat(n), ce_rows(labels, c, 0, F32.from_nat(n), AS{d, 0.0})) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.from_nat 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-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=AS https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=LossOut https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ce_fin https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ce_rows