-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ao] Fix to InputWeightEqualization detector to handle Conv groups #81971
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
Summary: The current implementation of the InputWeightEqualization detector broke when it was tested on MobileNetV2, and the reason for this is that it wasn't able to properly handle groups in Conv layers, and there also had to be some minor reshaping of the weights to handle this as well. In addition, the output was correspondingly tuned so that instead of giving on output for each channel on each layer, it gives a single suggestion per module and just lets it know how many of the channels could benefit from input-weight equalization, and suggests it if it's more than half. There was also the realization that the test class didn't do a good job of testing different dimensions for the batch vs. height vs. width, so this was updated to be more comprehensive as well. Test Plan: python test/test_quantization TestFxDetectInputWeightEqualization Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
🔗 Helpful links
✅ No Failures (0 Pending)As of commit c856e9a (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
…v groups" Summary: The current implementation of the InputWeightEqualization detector broke when it was tested on MobileNetV2, and the reason for this is that it wasn't able to properly handle groups in Conv layers, and there also had to be some minor reshaping of the weights to handle this as well. In addition, the output was correspondingly tuned so that instead of giving on output for each channel on each layer, it gives a single suggestion per module and just lets it know how many of the channels could benefit from input-weight equalization, and suggests it if it's more than half. There was also the realization that the test class didn't do a good job of testing different dimensions for the batch vs. height vs. width, so this was updated to be more comprehensive as well. Test Plan: python test/test_quantization TestFxDetectInputWeightEqualization Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
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.
lg overall, please see some comments inline
…v groups" Summary: The current implementation of the InputWeightEqualization detector broke when it was tested on MobileNetV2, and the reason for this is that it wasn't able to properly handle groups in Conv layers, and there also had to be some minor reshaping of the weights to handle this as well. In addition, the output was correspondingly tuned so that instead of giving on output for each channel on each layer, it gives a single suggestion per module and just lets it know how many of the channels could benefit from input-weight equalization, and suggests it if it's more than half. There was also the realization that the test class didn't do a good job of testing different dimensions for the batch vs. height vs. width, so this was updated to be more comprehensive as well. Test Plan: python test/test_quantization TestFxDetectInputWeightEqualization Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
|
@pytorchbot merge -g |
|
@pytorchbot successfully started a merge job. Check the current status here |
…81971) (#81971) Summary: The current implementation of the InputWeightEqualization detector broke when it was tested on MobileNetV2, and the reason for this is that it wasn't able to properly handle groups in Conv layers, and there also had to be some minor reshaping of the weights to handle this as well. In addition, the output was correspondingly tuned so that instead of giving on output for each channel on each layer, it gives a single suggestion per module and just lets it know how many of the channels could benefit from input-weight equalization, and suggests it if it's more than half. There was also the realization that the test class didn't do a good job of testing different dimensions for the batch vs. height vs. width, so this was updated to be more comprehensive as well. Pull Request resolved: #81971 Approved by: https://github.com/jerryzh168 Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/0cacaf070f4a67f6ef49281be260185e6fac84a3 Test plan from GitHub: python test/test_quantization TestFxDetectInputWeightEqualization Reviewed By: osalpekar Differential Revision: D38119589 Pulled By: vspenubarthi fbshipit-source-id: 3d0a1d2f569cdab0c96eb1d37424366d20d6cf6e
Stack from ghstack (oldest at bottom):
Summary: The current implementation of the InputWeightEqualization
detector broke when it was tested on MobileNetV2, and the reason for
this is that it wasn't able to properly handle groups in Conv layers,
and there also had to be some minor reshaping of the weights to handle
this as well.
In addition, the output was correspondingly tuned so that instead of
giving on output for each channel on each layer, it gives a single
suggestion per module and just lets it know how many of the channels
could benefit from input-weight equalization, and suggests it if it's
more than half.
There was also the realization that the test class didn't do a good job
of testing different dimensions for the batch vs. height vs. width, so
this was updated to be more comprehensive as well.
Test Plan: python test/test_quantization TestFxDetectInputWeightEqualization
Reviewers:
Subscribers:
Tasks:
Tags: