Docs / nablatensor-tensor / com.nablatensor.tensor
record
ConvSpec
The geometry of a 2-D convolution over batched, channel-major images.
Everything stays rank-2, which is the shape the rest of the library already speaks: one image per row, channels laid out one after another.
input (batch, inChannels * inHeight * inWidth) weights (outChannels, inChannels * kernel * kernel) output (batch, outChannels * outHeight * outWidth)
Square kernels only, and no bias: a bias is one broadcast add away and does not need to be inside the convolution.
Record components
Methods
int outHeight()
int outWidth()
int inputSize()
Elements per input image: inChannels * inHeight * inWidth.
int outputSize()
Elements per output image: outChannels * outHeight * outWidth.
int weightSize()
Elements per filter: inChannels * kernel * kernel.
Shape weightShape()
Shape inputShape(int batch)
Shape outputShape(int batch)
ConvSpec next(int nextOutChannels, int nextKernel, int nextStride, int nextPad)
The spec of a layer that consumes this layer's output.