mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 11:08:52 +00:00
More testing for avg-pool2d. (#366)
* More testing for avg-pool2d. * Another fix. * Add a max-pool test with non-divisible kernel sizes.
This commit is contained in:
@ -660,8 +660,8 @@ impl Map1 for AvgPool2D {
|
||||
let mut sum = T::zero();
|
||||
for m in 0..k_h {
|
||||
for n in 0..k_w {
|
||||
let m = k_h * h_idx + m;
|
||||
let n = k_w * w_idx + n;
|
||||
let m = s_h * h_idx + m;
|
||||
let n = s_w * w_idx + n;
|
||||
sum += src[src_index + m * stride_h + n * stride_w]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user