-
Notifications
You must be signed in to change notification settings - Fork 24.5k
hardswish: make it work in static quantization #36545
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
Closed
Closed
Conversation
This file contains hidden or 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
Summary: * adds a quantized nn.module for Hardswish so we can observe activation values * modifies the hardswish op to allow specifying scale + zero_point * makes hardswish model be properly swapped in static quantization Test Plan: added tests and they pass for: * the new _out flavor of hardswish * QNNPACK changes * static quant e2e Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced Apr 14, 2020
💊 Build failures summary and remediationsAs of commit 74a0986 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 8 times. |
Summary: * adds a quantized nn.module for Hardswish so we can observe activation values * modifies the hardswish op to allow specifying scale + zero_point * makes hardswish model be properly swapped in static quantization Test Plan: added tests and they pass for: * the new _out flavor of hardswish * QNNPACK changes * static quant e2e Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
vkuzo
added a commit
that referenced
this pull request
Apr 14, 2020
Summary: * adds a quantized nn.module for Hardswish so we can observe activation values * modifies the hardswish op to allow specifying scale + zero_point * makes hardswish model be properly swapped in static quantization Test Plan: added tests and they pass for: * the new _out flavor of hardswish * QNNPACK changes * static quant e2e Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: e17b9a0 Pull Request resolved: #36545
Summary: * adds a quantized nn.module for Hardswish so we can observe activation values * modifies the hardswish op to allow specifying scale + zero_point * makes hardswish model be properly swapped in static quantization Test Plan: added tests and they pass for: * the new _out flavor of hardswish * QNNPACK changes * static quant e2e Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
z-a-f
approved these changes
Apr 15, 2020
Summary: * adds a quantized nn.module for Hardswish so we can observe activation values * modifies the hardswish op to allow specifying scale + zero_point * makes hardswish model be properly swapped in static quantization Test Plan: added tests and they pass for: * the new _out flavor of hardswish * QNNPACK changes * static quant e2e Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
rgommers
added a commit
to rgommers/pytorch
that referenced
this pull request
Apr 20, 2020
Introduced in pytorchgh-36545, but unclear if that PR was problematic, the new error messages look similar to already silenced ones about Module: ``` torch/nn/quantized/modules/activation.py:84: error: Name 'torch.nn.Hardswish' is not defined [name-defined] torch/nn/qat/modules/activations.py:5: error: Name 'nn.Hardswish' is not defined [name-defined] torch/nn/qat/modules/activations.py:17: error: Module has no attribute "Hardswish" [attr-defined] torch/quantization/default_mappings.py:18: error: Module has no attribute "Hardswish" [attr-defined] torch/quantization/default_mappings.py:49: error: Module has no attribute "Hardswish" [attr-defined] torch/quantization/fake_quantize.py:126: error: Module has no attribute "per_tensor_symmetric" [attr-defined] torch/quantization/fake_quantize.py:132: error: Module has no attribute "per_channel_symmetric" [attr-defined] ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Summary:
Test Plan:
added tests and they pass for:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D21045320