Conv1d test with padding. (#356)

This commit is contained in:
Laurent Mazare
2023-08-09 06:45:38 +02:00
committed by GitHub
parent cf965ecaa8
commit dbc6f281c9
2 changed files with 31 additions and 1 deletions

View File

@ -1060,7 +1060,6 @@ impl<'a> Map2 for Conv2D<'a> {
let dst_idx = dst_idx + dst_w;
let mut d = T::zero();
for offset_h in 0..p.k_h {
// TODO: Handle the case where padding is larger than p.k_h / 2.
let src_h = (p.stride * dst_h + offset_h)
.saturating_sub(p.padding)
.min(p.i_h - 1);