Skip to main content

conv2d_nchw_f32

Function conv2d_nchw_f32 

Source
pub fn conv2d_nchw_f32(
    input: &[f32],
    c_in: usize,
    h: usize,
    w: usize,
    weight: &[f32],
    c_out: usize,
    kh: usize,
    kw: usize,
    bias: &[f32],
    stride_h: usize,
    stride_w: usize,
    pad_h: usize,
    pad_w: usize,
    out: &mut [f32],
) -> Result<(usize, usize), VisionError>
Expand description

2D convolution, NCHW layout, single batch (N=1).

  • input: [C_in * H * W]
  • weight: [C_out * C_in * KH * KW] (no groups)
  • bias: optional [C_out] or empty
  • output: [C_out * H_out * W_out]