Loss.targets_fit: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/loss.bend as Loss Lines 261-269 of bendtorch-core@0.1.0.0/src/autograd/loss.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/loss.bend&start_line=261&end_line=269 import Base # Whether every target is below `columns`, and there are `rows` of them. def targets_fit(+targets: List<&2, U32>, +rows: Nat, +columns: Nat) -> Bool: match targets rows: case Nil{} 0n: True{} case Con{+target, +rest} 1n+below: Bool.and(Nat.is_lt(U32.to_nat(target), columns), targets_fit(rest, below, columns)) case _ _: False{} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat