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

Make post training quant API support dataloader #38686

Conversation

LiuChiachi
Copy link
Contributor

PR types

New features

PR changes

APIs

Describe

This PR makes PostTrainingQuantization support paddle.io.DataLoader or Python Generator input, which would not be wrapped by set_batch_generator or set_sample_generator.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jan 4, 2022

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

@@ -303,7 +307,7 @@ def __init__(self,
self._program = None
self._feed_list = None
self._fetch_list = None
self._data_loader = None
self._data_loader = data_loader
Copy link
Contributor

Choose a reason for hiding this comment

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

能否加一下assert isinstance的判断,保证data_loader只能是Python Generator或者Paddle.io.DataLoader?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经加入了对输入的检查,十分感谢提醒~

yghstill
yghstill previously approved these changes Jan 4, 2022
@yghstill yghstill merged commit 0af1a87 into PaddlePaddle:develop Jan 5, 2022
LiuChiachi added a commit to LiuChiachi/Paddle that referenced this pull request Jan 5, 2022
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