Skip to main content

nchwc_conv

Function nchwc_conv 

Source
pub fn nchwc_conv(
    input_shape: &[i64; 4],
    kernel_shape: &[i64; 2],
    dilation_shape: &[i64; 2],
    padding: &[i64; 4],
    stride_shape: &[i64; 2],
    output_shape: &[i64; 4],
    group_count: usize,
    input: &[f32],
    filter: &[f32],
    bias: Option<&[f32]>,
    output: &mut [f32],
    activation: NchwcActivation,
    zero_mode: bool,
)
Expand description

Execute an NCHWc blocked 2-D convolution.

input/output are in NCHWc block layout except for the NCHW-input (first-layer) algorithm, where input stays plain NCHW. filter must be pre-reordered (OIHWBiBo or OIHWBo) to match the algorithm MLAS selects from the shape. bias, when present, must be padded to round_up(output_channels, block) elements. zero_mode false accumulates into output (Conv/Sum fusion); true overwrites it.