def images_selected

stelliferous@0.0.2.0 · tensor_convolution.bend:96

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/kernel_pipeline.bend as Pipeline
import stelliferous@0.0.2.0/kernel_tile.bend as Tile
import stelliferous@0.0.2.0/math_activation.bend as Activations

96def images_selected(~custom: F32 -> F32,+activation: Activations.Activation,empty: Bool,single: Bool,+count: U32,depth: U32,work: Pipeline.Work,input_size: U32,+output_size: U32,
97  input: Storage.Buffer<F32>,weights: Storage.Buffer<Tile.Tile8>,bias: Storage.Buffer<F32>) -> Storage.Buffer<F32>:
98  match empty:
99    case True{}: Tensors.buffer(~F32,0.0,0)
100    case False{}:
101      match single:
102        case True{}: Pipeline.run_packed(~custom,activation,depth,work,input,weights,bias)
103        case False{}:
104          batch(~custom,activation,U32.to_nat(count),0,depth,work,input_size,output_size,
105            input,weights,bias,Tensors.buffer(~F32,0.0,(count * output_size : U32)))

Uses (12)

Used by (1)