TensorConvolution.batch: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_convolution.bend as TensorConvolution Lines 80-94 of stelliferous@0.0.2.0/tensor_convolution.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_convolution.bend&start_line=80&end_line=94 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/storage_clone.bend as Clone import stelliferous@0.0.2.0/storage_copy.bend as Copy 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 def batch(~custom: F32 -> F32,+activation: Activations.Activation,count: Nat,+index: U32,+depth: U32,+work: Pipeline.Work,+input_size: U32,+output_size: U32, input: Storage.Buffer,weights: Storage.Buffer,bias: Storage.Buffer,output: Storage.Buffer) -> Storage.Buffer: match count: case 0n: output case 1n: Storage.bind_pair(~Storage.Buffer,~Storage.Buffer,~Storage.Buffer, image(~custom,activation,depth,work,index,input_size,input,weights,bias),source => result => copied_output(Copy.range(~F32,output_size,0,(index * output_size : U32),result,output))) case 2n+rest: Storage.bind_pair(~Storage.Buffer,~Storage.Buffer,~Storage.Buffer,Clone.clone(~Tile.Tile8,weights),current_weights => remaining_weights => Storage.bind_pair(~Storage.Buffer,~Storage.Buffer,~Storage.Buffer,Clone.clone(~F32,bias),current_bias => remaining_bias => Storage.bind_pair(~Storage.Buffer,~Storage.Buffer,~Storage.Buffer, image(~custom,activation,depth,work,index,input_size,input,current_weights,current_bias),source => result => batch(~custom,activation,1n+rest,(index + 1 : U32),depth,work,input_size,output_size,source,remaining_weights,remaining_bias, copied_output(Copy.range(~F32,output_size,0,(index * output_size : U32),result,output)))))) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_pipeline.bend&name=Work https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_tile.bend&name=Tile8 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/math_activation.bend&name=Activation https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=bind_pair https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_clone.bend&name=clone https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_copy.bend&name=range https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_convolution.bend&name=copied_output https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_convolution.bend&name=image