def band_shape

stelliferous@0.0.2.0 · tensor_window.bend:75

import stelliferous@0.0.2.0/tensor_window.bend as TensorWindow
import Base
import stelliferous@0.0.2.0/tensor_band.bend as Bands

75# pad is both the value outside the input and the initial accumulator.
76def band_shape(shape: List<&2,U32>,geometry: Bands.Geometry) -> Bool:
77  match shape geometry:
78    case [c,h,w] Bands.Geometry{n,ci,hi,wi}: U32.is_eq(n,1) && U32.is_eq(c,ci) && U32.is_eq(h,hi) && U32.is_eq(w,wi)
79    case [n,c,h,w] Bands.Geometry{ni,ci,hi,wi}: U32.is_eq(n,ni) && U32.is_eq(c,ci) && U32.is_eq(h,hi) && U32.is_eq(w,wi)
80    case shape geometry: False{}

Uses (6)

Used by (1)