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

Fix conv act int8 scale #38331

Merged
merged 3 commits into from
Jan 12, 2022

Conversation

sfraczek
Copy link
Contributor

@sfraczek sfraczek commented Dec 21, 2021

PR types

Bug fixes

PR changes

OPs

Describe

Make Scale_out scale apply to output after activation if fused with activation. When no activation, pass the scale as usual to output_shift_scale.

For conv we had:
act(Scale_out/scale_in_eltwiseresidual + Scale_out/(input_scaleweights_scale) * (a*w+b))
So we had to move Scale_out out of the act.

So we want to have:
Scale_outact(1/scale_in_eltwiseresidual + 1/(data_scaleweights_scale)(a*w+b))

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

jczaja
jczaja previously approved these changes Dec 22, 2021
Copy link
Contributor

@jczaja jczaja left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lidanqing-intel lidanqing-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@lidanqing-intel
Copy link
Contributor

@Aganlengzi Hi, could you please merge this PR? It fix conv int8 +activation accuracy bug issue.

Copy link
Contributor

@wozna wozna left a comment

Choose a reason for hiding this comment

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

LGTM

@paddle-bot-old
Copy link

Sorry to inform you that 7c1441d's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@lidanqing-intel
Copy link
Contributor

Related PR #38023

@lidanqing-intel
Copy link
Contributor

@baoachun Please review this PR

@lidanqing-intel lidanqing-intel assigned baoachun and unassigned sfraczek Jan 4, 2022
Copy link
Contributor

@baoachun baoachun left a comment

Choose a reason for hiding this comment

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

LGTM

@sfraczek
Copy link
Contributor Author

@baoachun hi could you please help merge this PR?

@Aganlengzi Aganlengzi merged commit 4825add into PaddlePaddle:develop Jan 12, 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.

6 participants