[PASS] fix conv_conv_fuse new weight compute error #10163
Merged
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.
PR devices
Host
PR types
Bug fixes
PR changes
PASS
Description
In the convolution-convolution fuse, the original new weight computation forgot to add a shift of conv1 weight, causing every new 3x3 array in new weight to be 9 same number, which only the 1st number is correct and others are all wrong. It further causes wrong inference results on models which contains patterns like 3x3conv-1x1conv that will do the above fuse.
Comparison between the original wrong new weight and the correct new weight after this fix:
We can see left has 3x3 arrays with all same numbers which are apparently wrong. On right, the weight is correct.