def checked

stelliferous@0.0.2.0 · tensor_convolution.bend:230

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/proofs/storage_certificate.bend as Certificate
import stelliferous@0.0.2.0/math_activation.bend as Activations

230def checked(~custom: F32 -> F32,+activation: Activations.Activation,geometry: Maybe<&2,Geometry>,input: Storage.Buffer<F32>,weights: Storage.Buffer<F32>,bias: Storage.Buffer<F32>,+shape: List<&2,U32>,fill: F32,+workers: U32) -> Tensors.Tensor<F32>:
231  match geometry:
232    case None{}: Tensors.Tensor{input,shape,fill,Tensors.Failed{Tensors.Problem{"conv2d",Tensors.InvalidArgument{shape}}},workers}
233    case Some{+geometry}:
234      Geometry{+count,batched,+dimensions} = geometry
235      Storage.Buffer{input,+input_length,Certificate.Certificate{+input_depth,input_equation}} = input
236      Storage.Buffer{weights,+weight_length,Certificate.Certificate{+weight_depth,weight_equation}} = weights
237      Storage.Buffer{bias,+bias_length,Certificate.Certificate{+bias_depth,bias_equation}} = bias
238      supported(~custom,activation,
239        dense_call_valid(dimensions,count,input_length,input_depth,weight_length,weight_depth,bias_length,bias_depth),geometry,
240        Storage.Buffer{input,input_length,Certificate.Certificate{input_depth,input_equation}},
241        Storage.Buffer{weights,weight_length,Certificate.Certificate{weight_depth,weight_equation}},
242        Storage.Buffer{bias,bias_length,Certificate.Certificate{bias_depth,bias_equation}},shape,fill,workers)

Uses (14)

Used by (1)