def pool

stelliferous@0.0.2.0 · tensor_operations.bend:255

import stelliferous@0.0.2.0/tensor_operations.bend as TensorOperations
import Base
import stelliferous@0.0.2.0/storage_buffer.bend as Storage
import stelliferous@0.0.2.0/tensor_shape.bend as Shapes
import stelliferous@0.0.2.0/tensor_access.bend as Access

255# Windows over the last two axes of channels contiguous planes: a sweep along
256# the columns of every row into middle, [channels,height,out_width], then a
257# sweep along the rows into output. Each sweep checks its own geometry and
258# counts.
259def pool(~Element: Data,~operation: Element -> Element -> Element,+pad: Element,input: Storage.Buffer<Element>,+pool: Access.Pool,+channels: U32,
260  middle: Storage.Buffer<Element>,output: Storage.Buffer<Element>) -> Outcome<(Storage.Buffer<Element> & Storage.Buffer<Element>)>:
261  Access.Pool{+height,+width,+kernel,+stride,+padding,+out_height,+out_width} = pool
262  pool_lines(~Element,~operation,pad,Shapes.product([channels,height],Some{1}),input,Access.Pool{height,width,kernel,stride,padding,out_height,out_width},channels,middle,output)

Uses (9)

Used by (1)