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
No related merge requests found
...@@ -91,8 +91,14 @@ void AvgPoolingImpl2D_cpu_forward_kernel(const AvgPooling_Op<2>::Attrs &attrs, ...@@ -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)]; output[oIndexFull] += input[iIndex + (ix+sx)*dims[3] + (iy+sy)];
} }
} }
// padding not used if (std::get<2>(attrs)) {
output[oIndexFull] /= (sxMax - sxMin) * (syMax - syMin); // 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