traversal_grouped.bend checks
raw source on the hub · import stelliferous@0.0.4.0/traversal_grouped.bend as Traversal_grouped
Shape-only groups and adjacent-pair trees, shared by the weight and bias gradients.
1 import
import Base
Types
type Range source · line 5 · raw
Data
Range@first:Nat -> @count:Nat -> Range
Definitions
def rows source · line 8 · raw
@remaining:Nat -> @+first:Nat -> @+height:Nat -> @+width:Nat -> @+span:Nat -> List<&2, Range>
def columns source · line 14 · raw
@remaining:Nat -> @+row:Nat -> @+first:Nat -> @+width:Nat -> @+group:Nat -> List<&2, Range>
def cat source · line 20 · raw
@left:List<&2, Range> -> @+right:List<&2, Range> -> List<&2, Range>
def wide_rows source · line 25 · raw
@remaining:Nat -> @+row:Nat -> @+width:Nat -> @+group:Nat -> List<&2, Range>
def ranges_selected source · line 31 · raw
@wide:Bool -> @+height:Nat -> @+width:Nat -> @+group:Nat -> List<&2, Range>
def ranges source · line 38 · raw
@+height:Nat -> @+width:Nat -> @+group:Nat -> List<&2, Range>
def tree source · line 60 · raw
@+values:List<&2, F32> -> F32
Templates
template pairs source · line 41 · raw
@-ownership:Quant -> @-Element:Kind(ownership) -> @-Context:Data -> @-combine:(@_:Context -> @_:Element -> @_:Element -> Element) -> @+context:Context -> @values:List<ownership, Element> -> List<ownership, Element>
template levels source · line 50 · raw
@-ownership:Quant -> @-Element:Kind(ownership) -> @-Context:Data -> @-zero:(@_:Context -> Element) -> @-combine:(@_:Context -> @_:Element -> @_:Element -> Element) -> @fuel:Nat -> @+context:Context -> @values:List<ownership, Element> -> Element
The original length bounds the number of tree levels. A singleton is returned directly, including its sign bit; there is no final addition.