tensor_layout.bend checks
raw source on the hub · import stelliferous@0.0.4.0/tensor_layout.bend as Tensor_layout
Layout operations consume their arguments. Reshape relabels the cells. set_slice, concat and pad place their sources in a new tensor, every component of the placement a task that reads only its own pieces. A reduction folds the lines of every piece in place when the pieces hold whole lines, and the lines of all cells in order otherwise.
11 imports
import Base import ./storage_buffer.bend as Storage import ./tensor_shape.bend as Shapes import ./tensor_view.bend as Views import ./tensor_operations.bend as Operations import ./tensor.bend as Tensors import ./tensor_grid.bend as Grid import ./tensor_pieces.bend as Pieces import ./tensor_line_chain.bend as LineChain import ./tensor_tasks.bend as Tasks import ./traversal_partition.bend as Partition
Types
type Survey source · line 176 · raw
Data
Survey@valid:Bool -> @total:U32 -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @workers:U32 -> Survey
type Planned source · line 222 · raw
Data
The origins, readings and segments of the parts of a concatenation.
Planned@origins:List<&2, 0xa2af805348d03b11eb853850859654f6/tensor.Origin> -> @readings:List<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_tasks.Reading>> -> @segments:List<&2, List<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_tasks.Segment>>> -> Planned
type Border source · line 306 · raw
@-Element:Data -> Data
Constant fills the new elements with one value; Edge repeats the nearest element of the tensor along every axis, so a corner holds the nearest corner element.
Constant@-Element:Data -> @value:Element -> Border<Element>
Edge@-Element:Data -> Border<Element>
Definitions
def naturals source · line 18 · raw
@values:List<&2, U32> -> List<&2, Nat>
def permuted source · line 23 · raw
@view:Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View> -> @order:List<&2, Nat> -> Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View>
def sliced source · line 28 · raw
@view:Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View> -> @axis:U32 -> @start:U32 -> @count:U32 -> @step:U32 -> Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View>
def same_count source · line 33 · raw
@left:Maybe<&2, U32> -> @right:Maybe<&2, U32> -> Bool
def extent_at source · line 50 · raw
@extents:List<&2, U32> -> @axis:Nat -> U32
def leading source · line 53 · raw
@ranked:Bool -> @+shape:List<&2, U32> -> Maybe<&2, U32>
def planes source · line 59 · raw
@+shape:List<&2, U32> -> Maybe<&2, U32>
The number of planes before the last two axes; none below rank two.
def prepend_repeated source · line 64 · raw
@axis:0xa2af805348d03b11eb853850859654f6/tensor_view.Axis -> @rest:Maybe<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.Axis>> -> Maybe<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.Axis>>
Nearest-neighbour upsampling repeats each element of the last two axes scale times, by copying from a view whose repeated axes have stride zero.
def repeated_axes source · line 69 · raw
@axes:List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.Axis> -> @+scale:U32 -> Maybe<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.Axis>>
def with_offset source · line 77 · raw
@axes:Maybe<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.Axis>> -> @offset:U32 -> Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View>
def repeated source · line 82 · raw
@view:Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View> -> @scale:U32 -> Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View>
def scaled_extents source · line 87 · raw
@extents:List<&2, U32> -> @+scale:U32 -> List<&2, U32>
def upsample_valid source · line 94 · raw
@+shape:List<&2, U32> -> @+scale:U32 -> Bool
The repeated extents and the output count fit the machine word.
def with_extent source · line 100 · raw
@extents:List<&2, U32> -> @axis:Nat -> @+extent:U32 -> List<&2, U32>
def placed_readings source · line 107 · raw
@target:List<&2, U32> -> @source:List<&2, U32> -> @shifts:List<&2, U32> -> @+target_grid:0xa2af805348d03b11eb853850859654f6/tensor_grid.Grid -> @+source_grid:0xa2af805348d03b11eb853850859654f6/tensor_grid.Grid -> @+clamped:Bool -> @+axis:U32 -> List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_tasks.Reading>
A source of extents source placed in a target of extents target at shifts: target index i of every axis reads source index i - shift.
def placed_segments source · line 116 · raw
@source:List<&2, U32> -> @shifts:List<&2, U32> -> List<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_tasks.Segment>>
Along every axis the source fills the indices from its shift on.
def edge_segments source · line 123 · raw
@target:List<&2, U32> -> @source:List<&2, U32> -> @shifts:List<&2, U32> -> List<&2, List<&2, 0xa2af805348d03b11eb853850859654f6/tensor_tasks.Segment>>
Along every axis the indices before the source repeat its first index and the indices after it its last.
def shifts_at source · line 131 · raw
@remaining:Nat -> @+axis:U32 -> @+start:U32 -> @+index:U32 -> List<&2, U32>
start on axis, zero on every other of remaining axes.
def slice_fits source · line 138 · raw
@target:List<&2, U32> -> @part:List<&2, U32> -> @+axis:U32 -> @+start:U32 -> @+index:U32 -> Bool
The part has the extents of the target but along axis, where it fits from start on.
def surveyed source · line 179 · raw
@survey:Survey -> @+shape:List<&2, U32> -> @+axis:Nat -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @workers:U32 -> Survey
def all_zero source · line 315 · raw
@values:List<&2, U32> -> Bool
def padded_count source · line 320 · raw
@shape:Maybe<&2, List<&2, U32>> -> Maybe<&2, U32>
def edge_axes source · line 326 · raw
@shape:List<&2, U32> -> @before:List<&2, U32> -> @after:List<&2, U32> -> Bool
An axis padded at an edge has an element to repeat.
def reduced_flags source · line 373 · raw
@remaining:Nat -> @+index:Nat -> @+reduced:List<&2, Nat> -> List<&2, Bool>
Every listed axis is below the rank. Whether each of remaining axes from index on is listed.
def all_below source · line 378 · raw
@axes:List<&2, U32> -> @+rank:Nat -> Bool
def chosen source · line 387 · raw
@member:Bool -> @+listed:Bool -> @+index:Nat -> @rest:List<&2, Nat> -> List<&2, Nat>
Reduction over listed axes. Output k, at the row-major index of the kept axes, folds the values of the reduced axes in row-major order, from initial, and holds finish of the fold: finish(operation(... operation(operation(initial, x[k, 0]), x[k, 1]) ..., x[k, R - 1])).
def axes_where source · line 393 · raw
@remaining:Nat -> @+index:Nat -> @+axes:List<&2, Nat> -> @+listed:Bool -> List<&2, Nat>
def extents_at source · line 398 · raw
@+shape:List<&2, U32> -> @indices:List<&2, Nat> -> List<&2, U32>
def line_view source · line 404 · raw
@+extents:List<&2, U32> -> @+order:List<&2, Nat> -> Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View>
The cells of extents read with the kept axes first and the reduced last.
def every_index source · line 408 · raw
@remaining:Nat -> @+index:Nat -> List<&2, Nat>
The axes index, index + 1, ... of a shape, remaining of them.
def cells_per_outer source · line 413 · raw
@+grid:0xa2af805348d03b11eb853850859654f6/tensor_grid.Grid -> U32
def in_order source · line 448 · raw
@axes:List<&2, Nat> -> @+index:Nat -> Bool
The axes index, index + 1, ... in this order.
def reversed_flags source · line 501 · raw
@remaining:Nat -> @+index:U32 -> @+axes:List<&2, U32> -> List<&2, Bool>
The axes of a shape read in reverse: one flag an axis.
def flipped source · line 506 · raw
@valid:Bool -> @view:Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View> -> Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View>
Templates
template reshape_status source · line 38 · raw
@-Element:Data -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @valid:Bool -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+source:List<&2, U32> -> @+shape:List<&2, U32> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template reshape source · line 46 · raw
@-Element:Data -> @tensor:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @+shape:List<&2, U32> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
Same elements in the same row-major order under new extents.
template slice_placed source · line 146 · raw
@-Element:Data -> @empty:Bool -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @part:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+part_shape:List<&2, U32> -> @+axis:U32 -> @+start:U32 -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template slice_status source · line 160 · raw
@-Element:Data -> @target:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @part:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @valid:Bool -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @part_pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+part_shape:List<&2, U32> -> @+axis:U32 -> @+start:U32 -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template set_slice source · line 169 · raw
@-Element:Data -> @target:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @+axis:U32 -> @+start:U32 -> @part:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
target[..., start : start + part extent, ...] = part along axis.
template prepend_survey source · line 184 · raw
@-Element:Data -> @tensor:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @result:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Survey) -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Survey)
template survey source · line 189 · raw
@-Element:Data -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> @+axis:Nat -> @summary:Survey -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Survey)
Summarizes the extents of every part and returns the parts in order.
template prepend_fit source · line 204 · raw
@-Element:Data -> @tensor:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @result:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Bool) -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Bool)
template fitting source · line 210 · raw
@-Element:Data -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> @+target:List<&2, U32> -> @+axis:U32 -> @+start:U32 -> @fits:Bool -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Bool)
Every part fits the joined extents along axis from where the parts before it end, as a part of set_slice does.
template planned_part source · line 225 · raw
@-Element:Data -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+axis:U32 -> @+start:U32 -> @+target:List<&2, U32> -> @+target_grid:0xa2af805348d03b11eb853850859654f6/tensor_grid.Grid -> @later:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Sources<Element>, Planned) -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Sources<Element>, Planned)
template concat_sources source · line 234 · raw
@-Element:Data -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> @+axis:U32 -> @+start:U32 -> @+target:List<&2, U32> -> @+target_grid:0xa2af805348d03b11eb853850859654f6/tensor_grid.Grid -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Sources<Element>, Planned)
Every part placed along axis from start on, in order.
template joined_parts source · line 241 · raw
@-Element:Data -> @+shape:List<&2, U32> -> @+fill:Element -> @+workers:U32 -> @planned:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Sources<Element>, Planned) -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template join_counted source · line 246 · raw
@-Element:Data -> @count:Maybe<&2, U32> -> @+shape:List<&2, U32> -> @+axis:U32 -> @+fill:Element -> @+workers:U32 -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template join_shaped source · line 252 · raw
@-Element:Data -> @empty:Bool -> @+shape:List<&2, U32> -> @+axis:U32 -> @+fill:Element -> @+workers:U32 -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
An empty result has no element to place.
template join_status source · line 257 · raw
@-Element:Data -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @valid:Bool -> @+first:List<&2, U32> -> @+shape:List<&2, U32> -> @+axis:U32 -> @+fill:Element -> @+workers:U32 -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template fitted_status source · line 264 · raw
@-Element:Data -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @+first:List<&2, U32> -> @+shape:List<&2, U32> -> @+axis:U32 -> @+fill:Element -> @+workers:U32 -> @fitted:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Bool) -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template joined source · line 269 · raw
@-Element:Data -> @+first:List<&2, U32> -> @+axis:U32 -> @+fill:Element -> @surveyed:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Survey) -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template lead source · line 275 · raw
@-Element:Data -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Pair(List<&2, U32>, Element))
template concat_first source · line 288 · raw
@-Element:Data -> @+axis:U32 -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> @+shape:List<&2, U32> -> @+fill:Element -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template concat_led source · line 292 · raw
@-Element:Data -> @+axis:U32 -> @led:Pair(0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element>, Pair(List<&2, U32>, Element)) -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template concat source · line 298 · raw
@-Element:Data -> @parts:0xa2af805348d03b11eb853850859654f6/tensor.Parts<Element> -> @+axis:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
Parts agree on every extent except axis; the result stacks them in order.
template border_name source · line 310 · raw
@-Element:Data -> @border:Border<Element> -> String
template border_fits source · line 332 · raw
@-Element:Data -> @border:Border<Element> -> @+shape:List<&2, U32> -> @+before:List<&2, U32> -> @+after:List<&2, U32> -> Bool
template pad_placed source · line 337 · raw
@-Element:Data -> @-Later:Data -> @-after:0xa2af805348d03b11eb853850859654f6/tensor.PieceMap(Element, Later) -> @+later:Later -> @border:Border<Element> -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+before:List<&2, U32> -> @+target:List<&2, U32> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template pad_valid source · line 347 · raw
@-Element:Data -> @-Later:Data -> @-after:0xa2af805348d03b11eb853850859654f6/tensor.PieceMap(Element, Later) -> @+later:Later -> @border:Border<Element> -> @valid:Bool -> @unchanged:Bool -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+before:List<&2, U32> -> @+target:List<&2, U32> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template pad_status source · line 354 · raw
@-Element:Data -> @-Later:Data -> @-after:0xa2af805348d03b11eb853850859654f6/tensor.PieceMap(Element, Later) -> @+later:Later -> @+border:Border<Element> -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @padded:Maybe<&2, List<&2, U32>> -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+before:List<&2, U32> -> @+behind:List<&2, U32> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template pad_then source · line 364 · raw
@-Element:Data -> @-Later:Data -> @-after:0xa2af805348d03b11eb853850859654f6/tensor.PieceMap(Element, Later) -> @+later:Later -> @+border:Border<Element> -> @tensor:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @+before:List<&2, U32> -> @+behind:List<&2, U32> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
The padding, then a map of every piece it fills.
template reduce_trailing source · line 419 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @+operations:F32 -> @+length:U32 -> @+initial:Accumulator -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+outputs:List<&2, U32> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
The lines of the reduced axes, last in the cells, fold from initial across the pieces in order. A task holds the pieces of whole outer indices.
template reduce_arranged source · line 428 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @+operations:F32 -> @+length:U32 -> @+initial:Accumulator -> @+kept:Nat -> @arranged:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
The reduced axes last: kept of the axes kept, the rest reduced.
template reduce_moved source · line 436 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @+operations:F32 -> @+length:U32 -> @+initial:Accumulator -> @trailing:Bool -> @view:Maybe<&2, 0xa2af805348d03b11eb853850859654f6/tensor_view.View> -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+kept:List<&2, Nat> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
The reduced axes move last unless they are.
template reduce_lined source · line 453 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @+operations:F32 -> @+length:U32 -> @+initial:Accumulator -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+kept:List<&2, Nat> -> @+reduced:List<&2, Nat> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template reduce_sized source · line 459 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @+operations:F32 -> @empty:Bool -> @unread:Bool -> @+count:U32 -> @+length:U32 -> @+initial:Accumulator -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+kept:List<&2, Nat> -> @+reduced:List<&2, Nat> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
No output, or outputs that fold no value.
template reduce_counted source · line 468 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @+name:String -> @+operations:F32 -> @count:Maybe<&2, U32> -> @length:Maybe<&2, U32> -> @+initial:Accumulator -> @pieces:0xa2af805348d03b11eb853850859654f6/tensor_pieces.Pieces(Element) -> @+shape:List<&2, U32> -> @+kept:List<&2, Nat> -> @+reduced:List<&2, Nat> -> @+fill:Element -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
template reduce_listed source · line 478 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @name:String -> @+operations:F32 -> @+initial:Accumulator -> @tensor:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @+kept:List<&2, Nat> -> @+reduced:List<&2, Nat> -> @valid:Bool -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
The reduction of the axes reduced, the others kept, both in increasing index. A failed tensor keeps its problem; an invalid list of axes fails.
template reduce_axes source · line 490 · raw
@-Element:Data -> @-Accumulator:Data -> @-operation:(@_:Accumulator -> @_:Element -> Accumulator) -> @-finish:(@_:Accumulator -> Element) -> @name:String -> @+operations:F32 -> @+initial:Accumulator -> @tensor:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element> -> @+axes:List<&2, U32> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<Element>
The result has the extents of the kept axes. Every listed axis is below the rank and listed once. operations prices the combination of one value.