Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Refine pruning logic #222

Merged
merged 10 commits into from
Apr 8, 2019
Merged

Refine pruning logic #222

merged 10 commits into from
Apr 8, 2019

Conversation

nzmora
Copy link
Contributor

@nzmora nzmora commented Apr 8, 2019

Add finer control over the pruning logic, to accomodate more pruning
use-cases.
The full description of the new logic will be available as documentation.

In this commit:

  • Added a new callback to the CompressionScheduler:
    compression_scheduler.before_parameter_optimization which is invoked
    after the gradients are are computed, but before the weights are updated
    by the optimizer.

  • We skip the first mini-batch of the first epoch (global_mini_batch_id == 0)
    because of PyTorch's SGD implementation (details later).

  • We register to the parameter backward hook in order to mask the gradients.
    This gives us finer control over the parameter updates.

  • Add several DropFilter schedules
    DropFilter is a method to regularize networks, and it can also be
    used to prepare a network for permanent filter pruning.

  • Add documentation of pruning fine-control

Add finer control over the pruning logic, to accomodate more pruning
use-cases.
The full description of the new logic will be available as documentation.

In this commit:
- Added a new callback to the CompressionScheduler:
```compression_scheduler.before_parameter_optimization``` which is invoked
after the gradients are are computed, but before the weights are updated
by the optimizer.

- We skip the first mini-batch of the first epoch (global_mini_batch_id == 0)
because of PyTorch's SGD implementation (details later).

- We register to the parameter backward hook in order to mask the gradients.
This gives us finer control over the parameter updates.
DropFilter is a method to regularize networks, and it can also be
used to prepare a network for permanent filter pruning.
'pages' was deprecated and replaced by 'nav'.
Also removed unused earlyexit.md file.
A new version of mkdocs moved files around - creating
and deleting files.
@nzmora nzmora merged commit 816a943 into master Apr 8, 2019
@nzmora nzmora deleted the refine_pruning_logic branch April 9, 2019 14:45
michaelbeale-IL pushed a commit that referenced this pull request Apr 24, 2023
Add finer control over the pruning logic, to accommodate more pruning
use-cases.
The full description of the new logic is available in the updated [documentation
of the CompressionScheduler](https://nervanasystems.github.io/distiller/schedule.html#pruning-fine-control), which is also part of this PR.

In this PR:

* Added a new callback to the CompressionScheduler:
compression_scheduler.before_parameter_optimization which is invoked
after the gradients are are computed, but before the weights are updated
by the optimizer.

* We provide an option to mask the gradients, before the weights are updated by the optimizer. 
We register to the parameter backward hook in order to mask the gradients.
This gives us finer control over the parameter updates.

* Added several DropFilter schedules.
DropFilter is a method to regularize networks, and it can also be
used to "prepare" a network for permanent filter pruning.

*Added documentation of pruning fine-control
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant