def band_context

stelliferous@0.0.2.0 · tensor_convolution.bend:134

import stelliferous@0.0.2.0/tensor_convolution.bend as TensorConvolution
import Base
import stelliferous@0.0.2.0/kernel_shape.bend as KernelShape
import stelliferous@0.0.2.0/tensor_band.bend as Bands
import stelliferous@0.0.2.0/tensor_band_window.bend as BandWindow
import stelliferous@0.0.2.0/kernel_band_pipeline.bend as BandPipeline
import stelliferous@0.0.2.0/math_activation.bend as Activations

134def band_context(geometry: Geometry,parallel: Bool,+activation: Activations.Activation) -> BandPipeline.Context:
135  Geometry{count,batched,KernelShape.Dimensions{+ci,rows,+height,+width,+kernel,+stride,+padding}} = geometry
136  BandPipeline.Context{BandWindow.Geometry{Bands.Geometry{count,U32.from_nat(ci),U32.from_nat(height),U32.from_nat(width)},U32.from_nat(kernel),U32.from_nat(stride),U32.from_nat(padding),
137    U32.from_nat(KernelShape.axis_size(height,kernel,stride,padding)),U32.from_nat(KernelShape.axis_size(width,kernel,stride,padding))},U32.from_nat(rows),U32.from_nat(Nat.mul(ci,Nat.mul(kernel,kernel))),parallel,activation}

Uses (10)

Used by (4)