def band_checked

stelliferous@0.0.2.0 · tensor_convolution.bend:307

import stelliferous@0.0.2.0/tensor_convolution.bend as TensorConvolution
import Base
import stelliferous@0.0.2.0/tensor.bend as Tensors
import stelliferous@0.0.2.0/storage_buffer.bend as Storage
import stelliferous@0.0.2.0/tensor_band.bend as Bands
import stelliferous@0.0.2.0/math_activation.bend as Activations

307def band_checked(~custom: F32 -> F32,+activation: Activations.Activation,geometry: Maybe<&2,Geometry>,+layout: Bands.Geometry,input: Bands.Bands(~F32),
308  weights: Storage.Buffer<F32>,bias: Storage.Buffer<F32>,+shape: List<&2,U32>,fill: F32,workers: U32) -> Tensors.Tensor<F32>:
309  match geometry:
310    case None{}: Tensors.Banded{input,layout,shape,fill,Tensors.Failed{Tensors.Problem{"conv2d",Tensors.InvalidArgument{shape}}},workers}
311    case Some{geometry}: band_inspected(~custom,activation,geometry,layout,weights,bias,shape,fill,workers,Bands.inspect(~F32,layout,input))

Uses (15)

Used by (1)