-
Notifications
You must be signed in to change notification settings - Fork 262
[pt] rb pruning #3688
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
base: develop
Are you sure you want to change the base?
[pt] rb pruning #3688
Conversation
8ba934d
to
3ead4c9
Compare
```bash | ||
python main.py | ||
# Or to run Regularization-Based pruning | ||
python main.py --mode rb |
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.
the documentation about sparsity is not connected with this sample and contains old configs.
are you going to update in the next PRs?
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.
yes,
|
||
|
||
@COMPRESSION_MODULES.register() | ||
class RBPruningMask(nn.Module, StatefulModuleInterface): |
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.
is it possible to save and load pruned model? Is there test for such functionality?
assert r == 0.5061728358268738 | ||
scheduler.step() | ||
r = float(1 - mask.sum() / 81) | ||
assert r == 0.1111111044883728 | ||
scheduler.step() | ||
r = float(1 - mask.sum() / 81) | ||
assert r == 0.48148149251937866 |
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.
shouldn't the ratio monotonously grow?
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.
No, it's exponential scheduler
sample has some unused imports. formatting of samples is not part of make-precommit routine, is it? |
no, it's works |
Changes
Add rb pruning algorithm
Rename prune folder to pruning
Add parameters to select pruning mode in example
Related tickets
173791