def first_dimension
import bendtorch-core@0.1.0.0/src/autograd/loss.bend as Lossimport Base
50# The first dimension of [rows, columns] logits, the batch.
51def first_dimension(+dimensions: List<&2, U32>) -> Nat:
52 match dimensions:
53 case Nil{}:
54 0n
55 case Con{+first, +rest}:
56 U32.to_nat(first)