def batch_of

bendtorch-core@0.1.0.0 · src/tensor/batched_matmul_LAWS.bend:308

import bendtorch-core@0.1.0.0/src/tensor/batched_matmul_LAWS.bend as BatchedMatmulLAWS
import Base

308# Every extent but the last two: the batch.
309def batch_of(dims: List<&2, Nat>) -> List<&2, Nat>:
310  match dims:
311    case +x <> +y <> +z <> tail:
312      x <> batch_of(y <> z <> tail)
313    case rest:
314      Nil{}

Uses (2)

Used by (2)