def leaf_inspection
stelliferous@0.0.2.0 · tensor_band.bend:444
import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base
444def leaf_inspection(geometry: Geometry,+length: Nat,depth: Nat,+first: U32,+rows: U32) -> Inspection:
445 Geometry{batch,+channels,+height,+width} = geometry
446 Inspection{U32.is_le(rows,(height - first % height : U32)) &&
447 Nat.is_le(Nat.add(U32.to_nat(first),U32.to_nat(rows)),Nat.mul(U32.to_nat(batch),U32.to_nat(height))) &&
448 Nat.is_eq(length,Nat.mul(U32.to_nat(channels),Nat.mul(U32.to_nat(rows),U32.to_nat(width)))) &&
449 Nat.is_le(length,U32.to_nat(U32.shln(1,depth))),first,(first + rows : U32),1}