kernel_shape.bend checks
raw source on the hub · import stelliferous@0.0.4.0/kernel_shape.bend as Kernel_shape
Natural dimensions at the validation boundary, before any machine narrowing. Convolution specifications and public tensor metadata use the same envelope.
2 imports
import Base import ./machine_limits.bend as Machine
Types
type Dimensions source · line 6 · raw
Data
Dimensions@input_channels:Nat -> @output_channels:Nat -> @height:Nat -> @width:Nat -> @kernel:Nat -> @stride:Nat -> @padding:Nat -> Dimensions
Definitions
def axis_size source · line 9 · raw
@+size:Nat -> @+kernel:Nat -> @stride:Nat -> @+padding:Nat -> Nat
def valid source · line 12 · raw
@shape:Dimensions -> @input_length:Nat -> @weight_length:Nat -> @bias_length:Nat -> Bool
def direct_bounds source · line 19 · raw
@+dimension:U32 -> @+capacity:U32 -> @+coordinate:U32 -> @shape:Dimensions -> @input_length:Nat -> @weight_length:Nat -> Bool
def plane_rows source · line 34 · raw
@+count:Nat -> @+ow:Nat -> @+kernel:Nat -> @+stride:Nat -> Nat
The rows of the planes a packed call transposes for count positions of an output of width ow, and the tiles of a row: Packing.plane_bound in natural numbers.
def plane_tiles source · line 37 · raw
@+ow:Nat -> @+kernel:Nat -> @+stride:Nat -> Nat
def planes_fit source · line 41 · raw
@+count:Nat -> @+ci:Nat -> @+ow:Nat -> @+kernel:Nat -> @+stride:Nat -> @+capacity:U32 -> Bool
The words of one plane and of all of them fit the capacity.
def packed_bounds source · line 46 · raw
@dimension:U32 -> @+capacity:U32 -> @coordinate:U32 -> @+shape:Dimensions -> @input_length:Nat -> @weight_length:Nat -> Bool
def supports_direct source · line 57 · raw
@limits:0xa2af805348d03b11eb853850859654f6/machine_limits.Limits -> @shape:Dimensions -> @input_length:Nat -> @weight_length:Nat -> Bool
Never duplicate the Limits owner: its Facts field depends on its values.
def supports_packed source · line 61 · raw
@limits:0xa2af805348d03b11eb853850859654f6/machine_limits.Limits -> @shape:Dimensions -> @input_length:Nat -> @weight_length:Nat -> Bool