Skip to content

Fix a few issues in MaxUnpool, ReduceMean/Max/Sum, Pad #21259

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
rogday:random_fixes
Dec 15, 2021
Merged

Fix a few issues in MaxUnpool, ReduceMean/Max/Sum, Pad #21259
opencv-pushbot merged 1 commit intoopencv:3.4from
rogday:random_fixes

Conversation

@rogday
Copy link
Copy Markdown
Member

@rogday rogday commented Dec 14, 2021

Fix MaxUnpool missing attributes, add default value of keepdims in ReduceMean/Max/Sum, add support for keepdims=true in full reduction branch, add new padding type to Pad.

Note: edge padding type used in test_ReplicationPad2d from pytorch_exported(#21088 adds only node tests) works after this patch with a catch: pads should be less than or equal to dim. copyMakeBorder uses memcpy under the hood and so CV_CheckLT guards us against copying overlapping memory, which is UB. I believe, it was meant to be CV_CheckLE, so that we can copy the whole dimension.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

…educemean/max/sum, add support for keepdims=true in full reduction branch, add new padding type to Pad
@rogday rogday added bug category: dnn (onnx) ONNX suport issues in DNN module labels Dec 14, 2021
@asmorkalov asmorkalov requested a review from sl-sergei December 15, 2021 07:46
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

Copy link
Copy Markdown
Contributor

@sl-sergei sl-sergei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@opencv-pushbot opencv-pushbot merged commit e7c5120 into opencv:3.4 Dec 15, 2021
@rogday rogday deleted the random_fixes branch December 15, 2021 11:15
@alalek alalek mentioned this pull request Dec 15, 2021
@rogday rogday mentioned this pull request Dec 21, 2021
48 tasks
@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug category: dnn (onnx) ONNX suport issues in DNN module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants