Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zihaomu
Copy link
Member

@zihaomu zihaomu commented Jul 11, 2022

Test Data.
Related #22195
In this PR, we fix Scaler Layer can not handle 1x1 weights correctly.

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 another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

@zihaomu zihaomu force-pushed the bug_fix_22195_3_4 branch from 0481c1c to 45fbb67 Compare July 13, 2022 03:26
@zihaomu zihaomu requested a review from rogday July 13, 2022 03:27
@zihaomu
Copy link
Member Author

zihaomu commented Jul 13, 2022

Hi @rogday, I decided not to modify code in findBroadAxis. The findBroadAxis only errors when total(broadShape) == 1, otherwise fine. Finaly I decide to add a scalar branch both in parseMul of onnx_importer and Scale Layer.
This is not a very good solution. If we want to completely solve the broadcast problem, we need #21865 support. For 3.4 branch, I think this is fine. And for 4.x branch, we will replace the current solution with fully broadcast support soon.

@zihaomu zihaomu requested a review from alalek July 13, 2022 06:40
Copy link
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.

LGTM 👍

@opencv-pushbot opencv-pushbot merged commit a9354fc into opencv:3.4 Jul 14, 2022
@alalek alalek mentioned this pull request Jul 26, 2022
This was referenced Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants