-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Implement is_qat in TorchVision #5299
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
Conversation
💊 CI failures summary and remediationsAs of commit 3880b53 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Job | Step | Action |
---|---|---|
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh | ||
sh conda.sh -b | ||
source $HOME/miniconda3/bin/activate | ||
conda install -yq conda-build cmake | ||
packaging/build_cmake.sh | ||
🔁 rerun |
This comment was automatically generated by Dr. CI (expand for details).
Please report bugs/suggestions to the (internal) Dr. CI Users group.
# Quantized Classification | ||
model = M.quantization.mobilenet_v3_large(pretrained=False, quantize=False) | ||
model.fuse_model() | ||
model.fuse_model(is_qat=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you like to use fuse_model and fuse_model_qat or the flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. Apologies, I'm not sure I follow. Could you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good I think, thanks for updating the APIs!
Summary: * Add is_qat support using a method getter * Switch to an internal _fuse_modules * Fix linter. * Pass is_qat=False on PTQ * Fix bug on ra_sampler flag. * Set is_qat=True for QAT Reviewed By: kazhang Differential Revision: D33995922 fbshipit-source-id: 4a7578ea54892e57189773d45533323c7636e5a7
Due to the breaking changes introduced at pytorch/pytorch#70009 and pytorch/pytorch#71956, TorchVision needs to make changes on the quantization code. This PR should make adjustments in a BC manner.
Before merging:
cc @jerryzh168