TensorBandPool.pooled: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_band_pool.bend as TensorBandPool Lines 46-56 of stelliferous@0.0.2.0/tensor_band_pool.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_band_pool.bend&start_line=46&end_line=56 import Base import stelliferous@0.0.2.0/tensor_access.bend as Access import stelliferous@0.0.2.0/tensor_operations.bend as Operations import stelliferous@0.0.2.0/tensor_band.bend as Bands import stelliferous@0.0.2.0/storage_buffer.bend as Storage # The destination of the two sweeps of channels stored planes: along the # columns into middle, [channels,height,out_width], then along the rows from # origin into output. def pooled(~Element: Data,~operation: Element -> Element -> Element,+pool: Access.Pool,+pad: Element,origin: U32,+channels: U32, input: Storage.Buffer,middle: Storage.Buffer,output: Storage.Buffer) -> Storage.Buffer: Access.Pool{+height,+width,+kernel,+stride,+padding,+out_height,+out_width} = pool +pool = {Access.Pool{height,width,kernel,stride,padding,out_height,out_width} : Access.Pool} Bands.destination(~Element,Operations.swept(~Element,~operation,U32.to_nat((channels * out_height * out_width : U32)), Access.SweepContext{Access.pool_rows(pool,origin),pad}, Bands.destination(~Element,Operations.swept(~Element,~operation,U32.to_nat((channels * height * out_width : U32)), Access.SweepContext{Access.pool_columns(pool),pad},input,middle)),output)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=Pool https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=SweepContext https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=pool_columns https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=pool_rows https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=destination https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&name=swept