-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaxPool 8 reference implementation #7115
Conversation
ngraph/core/reference/include/ngraph/runtime/reference/max_pool.hpp
Outdated
Show resolved
Hide resolved
ngraph/core/reference/include/ngraph/runtime/reference/max_pool.hpp
Outdated
Show resolved
Hide resolved
@ilyachur since there's no plugin implementation yet and there's nothing to compare against, should this PR contain single layer tests or should they be delivered with any plugin implementation (CPU first I assume)? |
It is strange to have tests which are disabled for all components 😄 I think we can add SLT tests in the separate PR. |
ngraph/core/reference/include/ngraph/runtime/reference/max_pool.hpp
Outdated
Show resolved
Hide resolved
ngraph/core/reference/include/ngraph/runtime/reference/max_pool.hpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the math perspective changes looks good, but there are a number of simple optimizations which should be applied.
Details:
kernel_position
variable represented as theCoord<T>
object tracks the top-left corner of the kernel. If the kernel overlaps with the padding area, the coordinates of the top-left corner are negative.kernel_offset
is used to to track the currently considered/processed pixel under a kernel. The offsets is always a positive number and represents a distance from the top-left corner of the kernel. For non-dilated kernel the offsets for each kernel axis are ascending ranges[0, 1, 2, ..., kernel_size)
. For dilated kernels the ranges are[0, dilation, 2*dilation, 3*dilation, ...)
Tickets: