pytorch
490631aa - [ao][sparsity] Support for the nn.Parameter in BaseDataSparsifier

Commit
2 years ago
[ao][sparsity] Support for the nn.Parameter in BaseDataSparsifier Users can now just pass in a nn.Parameter (or layer.weight) to the Data Sparsifier. Note: The data sparsifier stores the passed nn.Parameter as a new parameter in the internal container module whose requires_grad=False. So, essentialy when the parameter is trained, it's new values are not reflected inside the data sparsifier class Test Plan: ```python test/test_ao_sparsity.py TestBaseDataSparsifier``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/79253 Approved by: https://github.com/z-a-f
Author
Committer
Parents
Loading