Skip to content
Snippets Groups Projects
Commit 79e3c00f authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Added CountIncludePad attribute

parent 7c21dac5
No related branches found
No related tags found
2 merge requests!73version 0.2.3,!70Multiple refactors
Pipeline #48783 failed
......@@ -91,8 +91,14 @@ void AvgPoolingImpl2D_cpu_forward_kernel(const AvgPooling_Op<2>::Attrs &attrs,
output[oIndexFull] += input[iIndex + (ix+sx)*dims[3] + (iy+sy)];
}
}
// padding not used
output[oIndexFull] /= (sxMax - sxMin) * (syMax - syMin);
if (std::get<2>(attrs)) {
// count_include_pad is true
output[oIndexFull] /= std::get<1>(attrs)[0] * std::get<1>(attrs)[1];
}
else {
// padding not used
output[oIndexFull] /= (sxMax - sxMin) * (syMax - syMin);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment