Merged
Conversation
alalek
reviewed
Sep 2, 2021
Comment on lines
+113
to
+118
| if (outHeight == inputs[0].size[2] && outWidth == inputs[0].size[3]) | ||
| { | ||
| if (inputs[0].data != outputs[0].data) | ||
| { | ||
| inputs[0].copyTo(outputs[0]); | ||
| } |
Member
There was a problem hiding this comment.
Thank you for the fix!
- Please fix indentation (4 spaces)
- Please add comment that: Zero copy
outputs[0] = inputs[0]+outputs_arr.assign()doesn't work due toBlobManager(doesn't respect real refcounts from Mat).
alalek
approved these changes
Sep 3, 2021
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge with extra: opencv/opencv_extra#905
Fixes #17726
relates #11050 (code branch has zero coverage)
The results of nets start diverging after(including) 'decoder/concat'
Concatlayer. I tracked it down to dnn.cpp:2962, where the optimization of this layer is applied: it disables 'decoder/concat' layer and changes the output mats of input layers of typeResizeBilinearto point to different parts of the one big matrix. The problem is in 'decoder/ResizeBilinear_1': it effectively does nothing since its input is already has 64x64 WxH, and so it just returns, doing nothing. But if the optimization was applied, input and output matrices differ and a copy should be performed.opencv_extra=resize_concat_optimizationPull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.