Skip to content
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

[PASS] fix conv_conv_fuse new weight compute error #10163

Merged
merged 1 commit into from
Apr 6, 2023
Merged

[PASS] fix conv_conv_fuse new weight compute error #10163

merged 1 commit into from
Apr 6, 2023

Conversation

wasupandceacar
Copy link
Contributor

@wasupandceacar wasupandceacar commented Apr 1, 2023

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:

image

We can see left has 3x3 arrays with all same numbers which are apparently wrong. On right, the weight is correct.

@paddle-bot
Copy link

paddle-bot bot commented Apr 1, 2023

Thanks for your contribution!

@wasupandceacar
Copy link
Contributor Author

@mjp9527 @hong19860320 @zhupengyang any update

Copy link
Collaborator

@mjp9527 mjp9527 left a comment

Choose a reason for hiding this comment

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

LGTM

@mjp9527 mjp9527 merged commit 7d73319 into PaddlePaddle:develop Apr 6, 2023
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.

2 participants