~/bend-docscommunity

tensor_tiled_pool.bend checks

raw source on the hub · import stelliferous@0.0.4.0/tensor_tiled_pool.bend as Tensor_tiled_pool

Pooling over the last two axes of a tiled tensor. A usable tensor of rank three or more with a valid pool takes its lanes on the third axis from the end with the groups innermost, the image cells of the window; the cells pool with the operation at every lane from a tile of pad, and the lanes past the true extent are +0. A tensor of rank two pools as one of rank three with a leading axis of extent 1. Any other input fails with an invalid argument, or keeps its problem.

9 imports
import Base
import ./kernel_tile.bend as Tile
import ./tensor_access.bend as Access
import ./tensor.bend as Tensors
import ./tensor_grid.bend as Grid
import ./tensor_window.bend as Window
import ./tensor_tiled.bend as Tiled
import ./tensor_tiled_map.bend as TiledMap
import ./tensor_tiled_layout.bend as TiledLayout

Templates

template windowed source · line 22 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @+pad:F32 -> @+taps:0xa2af805348d03b11eb853850859654f6/tensor_window.Taps -> @+lanes:U32 -> @+out_height:U32 -> @+out_width:U32 -> @+outputs:List<&2, U32> -> @+workers:U32 -> @cells:0xa2af805348d03b11eb853850859654f6/tensor.Tensor<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8> -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>

The output cells of the input cells. Rows and steps of an output cell: every tap loads a sample tile and runs one lane operation and thirteen steps of addressing and bounds, every kernel row one lane operation and twelve steps, and the cell stores one tile with twenty steps around it.

template pooled source · line 31 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @+pad:F32 -> @+pool:0xa2af805348d03b11eb853850859654f6/tensor_access.Pool -> @+shape:List<&2, U32> -> @+workers:U32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled

template routed source · line 39 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @name:String -> @route:Bool -> @+pad:F32 -> @+pool:0xa2af805348d03b11eb853850859654f6/tensor_access.Pool -> @+shape:List<&2, U32> -> @+workers:U32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled

template ranked source · line 44 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @name:String -> @+pad:F32 -> @+kernel:U32 -> @+stride:U32 -> @+padding:U32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @+shape:List<&2, U32> -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled

template cells_pool source · line 50 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @name:String -> @+pad:F32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @+kernel:U32 -> @+stride:U32 -> @+padding:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled

The pool on the cells of a tensor of rank three or more.

template planar source · line 54 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @name:String -> @+shape:List<&2, U32> -> @valid:Bool -> @+pad:F32 -> @+kernel:U32 -> @+stride:U32 -> @+padding:U32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled

A valid pool of rank two pools the tensor with a leading axis of extent 1.

template dispatched source · line 61 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @name:String -> @three:Bool -> @+pad:F32 -> @+kernel:U32 -> @+stride:U32 -> @+padding:U32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @+shape:List<&2, U32> -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @+workers:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled

template pool2d source · line 67 · raw

@-operation:(@_:F32 -> @_:F32 -> F32) -> @name:String -> @+pad:F32 -> @tiled:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @+kernel:U32 -> @+stride:U32 -> @+padding:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled