Skip to content

FIX: Conv[DepthWise] forward implementation and add tests

Maxence Naud requested to merge fix_Conv3x3_stride into main

Context

Call to Conv(kernel_size=[3,3], stride = [2,2]) was returning a random Tensor.

After careful review, it appears the new Conv implementation !101 (merged), if faster, splits the computation in more small cases that were not all tested. For example, Conv(kernel_size=[3,3], stride = [2,2]) and Conv(kernel_size=[3,3], stride = [2,2]) don't go through the same loop.

This MR adds tests for each of the following cases for Conv and ConvDepthWise:

  • kernel [3, 3]
    • no stride, no dilation
    • stride [2,2], no dilation
    • stride [2,2], dilation [2,2]
  • kernel [1,1]
    • no stride, no dilation
    • stride [3,3], no dilation
    • stride [3,3], dilation [2,2]
  • kernel [5,5]
    • no stride, no dilation
    • stride [2,2], no dilation
    • stride [2,2], dilation [2,2]

Some issues were found thanks to these new tests and fixed.

Edited by Maxence Naud

Merge request reports

Loading