-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[quant] Run weight_post_process for QAT (#33852)
Summary: Pull Request resolved: pytorch/pytorch#33852 This fixes an issue for QAT models. During eval if we call `prepare_qat` and `convert` before calling `load_state_dict` it throws an error because the weight info (num channels) is not updated in the observer module. It is not an issue for per-tensor case Fixes issue #33830 Test Plan: python test/test_quantization.py EagerModePostTrainingQuantTest.test_eval_after_train python test/test_quantization.py EagerModeQuantizationAwareTrainingTest.test_eval_after_train Imported from OSS Differential Revision: D20212996 fbshipit-source-id: a04af8fe4df2e555270ae4d6693f5777d86f8a46
- Loading branch information
1 parent
d59e036
commit e236e15
Showing
3 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters