-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Reference Implementation of ROIPooling op #2903
Reference Implementation of ROIPooling op #2903
Conversation
Please, take Single Layer test from PR, refactor this if it will be necessary and instantiate for CPU plugin |
…pe to plain int" This reverts commit d49cfa8.
|
||
const int num_rois = rois_shape[0]; | ||
|
||
for (unsigned int i = 0; i < shape_size(output_shape); i++) |
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.
This looks like std::fill_n
.
ngraph/core/reference/include/ngraph/runtime/reference/roi_pooling.hpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/roi_pooling.hpp
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.
The main comment is that the shape inference function must be more specific and try to calculate output shape even if some of the input dimensions are dynamic.
inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/roi_pooling.cpp
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.
The spec changes and partial inference function LGTM.
ngraph/core/reference/include/ngraph/runtime/reference/roi_pooling.hpp
Outdated
Show resolved
Hide resolved
* ROIPooling: Specification and op class alignment * ROIPooling: Add check to input tensor type to be aligned with spec * ROIPooling: Corrected spec description for input tensor shape and box coordinates * ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int * Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int" This reverts commit d49cfa8. * ROIPooling: Further specification changes * ROIPooling: Rename enum class ROIPoolingMethod methods * Fix style * ROIPooling: Draft reference implementation * ROIPooling: Adjust feature map element type to float for attribute unit test * ROIPooling: Add single layer test class * ROIPooling: Corrected output index to iterate through output tensor elements * ROIPooling: Added validation checks for input types in op constructor * ROIPooling: Add unit tests * ROIPooling: Attributes unit test changed to align with spec * ROIPooling: Add check for batch id in reference implementation and unit test * ROIPooling: Refactor single layer test class * ROIPooling: Add test for invalid pooling method * ROIPooling: Clean up unnecessary function declaration * ROIPooling: Remove duplicated default ROIPooling method in op constructors * ROIPooling: Add Infer method to generate suitable ROI data * ROIPooling: CPU single layer test instantiation for max method * ROIPooling: Remove enum class ROIPoolingMethod * Revert "ROIPooling: Clean up unnecessary function declaration" This reverts commit 074b540. * ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod * ROIPooling: Add attribute checks in op constructor to align with spec and unit tests * Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t * ROIPooling: Fix for output index calculation to loop through all ROIs * ROIPooling: Add unit test for bilinear interpolation method * ROIPooling: Add CPU single layer test instantiation for bilinear method * ROIPooling: Clean up unnecessary enum class for pooling method * ROIPooling: Add myriad single layer test instantiation * ROIPooling: Add F16 precision single layer tests for CPU plugin * ROIPooling: Add node validation check for string method attribute in constructor and unit tests * ROIPooling: Spec changes to improve understanding of the operation * ROIPooling: Fix for bilinear method when pooled size is 1x1 * ROIPooling: Add unit test for bilinear method and pooled size 1x1 * ROIPooling: Fix to broken format of specifications * ROIPooling: Disable Myriad single layer tests * ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests * ROIPooling: Code clean up * ROIPooling: Address review comments * ROIPooling: Changed location for makeROIPooling helper method Co-authored-by: Kirill Molchanov <[email protected]>
* ROIPooling: Specification and op class alignment * ROIPooling: Add check to input tensor type to be aligned with spec * ROIPooling: Corrected spec description for input tensor shape and box coordinates * ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int * Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int" This reverts commit d49cfa8. * ROIPooling: Further specification changes * ROIPooling: Rename enum class ROIPoolingMethod methods * Fix style * ROIPooling: Draft reference implementation * ROIPooling: Adjust feature map element type to float for attribute unit test * ROIPooling: Add single layer test class * ROIPooling: Corrected output index to iterate through output tensor elements * ROIPooling: Added validation checks for input types in op constructor * ROIPooling: Add unit tests * ROIPooling: Attributes unit test changed to align with spec * ROIPooling: Add check for batch id in reference implementation and unit test * ROIPooling: Refactor single layer test class * ROIPooling: Add test for invalid pooling method * ROIPooling: Clean up unnecessary function declaration * ROIPooling: Remove duplicated default ROIPooling method in op constructors * ROIPooling: Add Infer method to generate suitable ROI data * ROIPooling: CPU single layer test instantiation for max method * ROIPooling: Remove enum class ROIPoolingMethod * Revert "ROIPooling: Clean up unnecessary function declaration" This reverts commit 074b540. * ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod * ROIPooling: Add attribute checks in op constructor to align with spec and unit tests * Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t * ROIPooling: Fix for output index calculation to loop through all ROIs * ROIPooling: Add unit test for bilinear interpolation method * ROIPooling: Add CPU single layer test instantiation for bilinear method * ROIPooling: Clean up unnecessary enum class for pooling method * ROIPooling: Add myriad single layer test instantiation * ROIPooling: Add F16 precision single layer tests for CPU plugin * ROIPooling: Add node validation check for string method attribute in constructor and unit tests * ROIPooling: Spec changes to improve understanding of the operation * ROIPooling: Fix for bilinear method when pooled size is 1x1 * ROIPooling: Add unit test for bilinear method and pooled size 1x1 * ROIPooling: Fix to broken format of specifications * ROIPooling: Disable Myriad single layer tests * ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests * ROIPooling: Code clean up * ROIPooling: Address review comments * ROIPooling: Changed location for makeROIPooling helper method Co-authored-by: Kirill Molchanov <[email protected]>
* ROIPooling: Specification and op class alignment * ROIPooling: Add check to input tensor type to be aligned with spec * ROIPooling: Corrected spec description for input tensor shape and box coordinates * ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int * Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int" This reverts commit d49cfa8. * ROIPooling: Further specification changes * ROIPooling: Rename enum class ROIPoolingMethod methods * Fix style * ROIPooling: Draft reference implementation * ROIPooling: Adjust feature map element type to float for attribute unit test * ROIPooling: Add single layer test class * ROIPooling: Corrected output index to iterate through output tensor elements * ROIPooling: Added validation checks for input types in op constructor * ROIPooling: Add unit tests * ROIPooling: Attributes unit test changed to align with spec * ROIPooling: Add check for batch id in reference implementation and unit test * ROIPooling: Refactor single layer test class * ROIPooling: Add test for invalid pooling method * ROIPooling: Clean up unnecessary function declaration * ROIPooling: Remove duplicated default ROIPooling method in op constructors * ROIPooling: Add Infer method to generate suitable ROI data * ROIPooling: CPU single layer test instantiation for max method * ROIPooling: Remove enum class ROIPoolingMethod * Revert "ROIPooling: Clean up unnecessary function declaration" This reverts commit 074b540. * ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod * ROIPooling: Add attribute checks in op constructor to align with spec and unit tests * Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t * ROIPooling: Fix for output index calculation to loop through all ROIs * ROIPooling: Add unit test for bilinear interpolation method * ROIPooling: Add CPU single layer test instantiation for bilinear method * ROIPooling: Clean up unnecessary enum class for pooling method * ROIPooling: Add myriad single layer test instantiation * ROIPooling: Add F16 precision single layer tests for CPU plugin * ROIPooling: Add node validation check for string method attribute in constructor and unit tests * ROIPooling: Spec changes to improve understanding of the operation * ROIPooling: Fix for bilinear method when pooled size is 1x1 * ROIPooling: Add unit test for bilinear method and pooled size 1x1 * ROIPooling: Fix to broken format of specifications * ROIPooling: Disable Myriad single layer tests * ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests * ROIPooling: Code clean up * ROIPooling: Address review comments * ROIPooling: Changed location for makeROIPooling helper method Co-authored-by: Kirill Molchanov <[email protected]>
* ROIPooling: Specification and op class alignment * ROIPooling: Add check to input tensor type to be aligned with spec * ROIPooling: Corrected spec description for input tensor shape and box coordinates * ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int * Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int" This reverts commit d49cfa8. * ROIPooling: Further specification changes * ROIPooling: Rename enum class ROIPoolingMethod methods * Fix style * ROIPooling: Draft reference implementation * ROIPooling: Adjust feature map element type to float for attribute unit test * ROIPooling: Add single layer test class * ROIPooling: Corrected output index to iterate through output tensor elements * ROIPooling: Added validation checks for input types in op constructor * ROIPooling: Add unit tests * ROIPooling: Attributes unit test changed to align with spec * ROIPooling: Add check for batch id in reference implementation and unit test * ROIPooling: Refactor single layer test class * ROIPooling: Add test for invalid pooling method * ROIPooling: Clean up unnecessary function declaration * ROIPooling: Remove duplicated default ROIPooling method in op constructors * ROIPooling: Add Infer method to generate suitable ROI data * ROIPooling: CPU single layer test instantiation for max method * ROIPooling: Remove enum class ROIPoolingMethod * Revert "ROIPooling: Clean up unnecessary function declaration" This reverts commit 074b540. * ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod * ROIPooling: Add attribute checks in op constructor to align with spec and unit tests * Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t * ROIPooling: Fix for output index calculation to loop through all ROIs * ROIPooling: Add unit test for bilinear interpolation method * ROIPooling: Add CPU single layer test instantiation for bilinear method * ROIPooling: Clean up unnecessary enum class for pooling method * ROIPooling: Add myriad single layer test instantiation * ROIPooling: Add F16 precision single layer tests for CPU plugin * ROIPooling: Add node validation check for string method attribute in constructor and unit tests * ROIPooling: Spec changes to improve understanding of the operation * ROIPooling: Fix for bilinear method when pooled size is 1x1 * ROIPooling: Add unit test for bilinear method and pooled size 1x1 * ROIPooling: Fix to broken format of specifications * ROIPooling: Disable Myriad single layer tests * ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests * ROIPooling: Code clean up * ROIPooling: Address review comments * ROIPooling: Changed location for makeROIPooling helper method Co-authored-by: Kirill Molchanov <[email protected]>
* ROIPooling: Specification and op class alignment * ROIPooling: Add check to input tensor type to be aligned with spec * ROIPooling: Corrected spec description for input tensor shape and box coordinates * ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int * Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int" This reverts commit d49cfa8. * ROIPooling: Further specification changes * ROIPooling: Rename enum class ROIPoolingMethod methods * Fix style * ROIPooling: Draft reference implementation * ROIPooling: Adjust feature map element type to float for attribute unit test * ROIPooling: Add single layer test class * ROIPooling: Corrected output index to iterate through output tensor elements * ROIPooling: Added validation checks for input types in op constructor * ROIPooling: Add unit tests * ROIPooling: Attributes unit test changed to align with spec * ROIPooling: Add check for batch id in reference implementation and unit test * ROIPooling: Refactor single layer test class * ROIPooling: Add test for invalid pooling method * ROIPooling: Clean up unnecessary function declaration * ROIPooling: Remove duplicated default ROIPooling method in op constructors * ROIPooling: Add Infer method to generate suitable ROI data * ROIPooling: CPU single layer test instantiation for max method * ROIPooling: Remove enum class ROIPoolingMethod * Revert "ROIPooling: Clean up unnecessary function declaration" This reverts commit 074b540. * ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod * ROIPooling: Add attribute checks in op constructor to align with spec and unit tests * Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t * ROIPooling: Fix for output index calculation to loop through all ROIs * ROIPooling: Add unit test for bilinear interpolation method * ROIPooling: Add CPU single layer test instantiation for bilinear method * ROIPooling: Clean up unnecessary enum class for pooling method * ROIPooling: Add myriad single layer test instantiation * ROIPooling: Add F16 precision single layer tests for CPU plugin * ROIPooling: Add node validation check for string method attribute in constructor and unit tests * ROIPooling: Spec changes to improve understanding of the operation * ROIPooling: Fix for bilinear method when pooled size is 1x1 * ROIPooling: Add unit test for bilinear method and pooled size 1x1 * ROIPooling: Fix to broken format of specifications * ROIPooling: Disable Myriad single layer tests * ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests * ROIPooling: Code clean up * ROIPooling: Address review comments * ROIPooling: Changed location for makeROIPooling helper method Co-authored-by: Kirill Molchanov <[email protected]>
Overview:
ticket: 37530