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 fetch op rename_input bug in QAT export model #38012

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

yghstill
Copy link
Contributor

@yghstill yghstill commented Dec 9, 2021

PR types

Bug fixes

PR changes

APIs

Describe

If next_op is fetch and out_var_name in fetch_targets, fetch_targets must update, so fix fetch op rename_input bug in QAT export model.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Dec 9, 2021

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

@wanghaoshuang
Copy link
Contributor

wanghaoshuang commented Dec 10, 2021

conv2d_1-->tensor_A-->moving_average_abs_max_scale-->tensor_B-->conv2d_2
                                                        |
                                                         --->fetch

To remove unused moving_average_abs_max_scale from quantization graph, the input of conv2d_2 will be renamed to tensor_A. And hence tensor_B will be pruned with moving_average_abs_max_scale when saving inference model.
So we should replace tensor_B with tensor_A in fetched list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants