-
- Downloads
small tensor masking API refactoring (#499)
Added masking primitives: -mask_tensor -create_mask_threshold_criterion -create_mask_level_criterion -create_mask_sensitivity_criterion These APIs have a clearer name and communicate their responsibility better: create a tensor mask, based on some criterion. Previously, distiller.pruning.create_mask_threshold_criterion was named distiller.threshold_mask which did not communicate well what this function did. Masking functionality is no longer hidden inside the Pruner instances, so they can be used directly by an application, or to compose new Pruner classes. Removed file distiller.pruning.pruner: -The base-class _ParameterPruner is useless and adds needless details to the implementation. AGP: Separated the pruning-rate schedule from the rest of the logic. This allows us to mix-and-match different pruning-rate schedules (just like LR schedulers).
Showing
- distiller/__init__.py 17 additions, 15 deletionsdistiller/__init__.py
- distiller/norms.py 1 addition, 0 deletionsdistiller/norms.py
- distiller/pruning/__init__.py 86 additions, 0 deletionsdistiller/pruning/__init__.py
- distiller/pruning/automated_gradual_pruner.py 35 additions, 29 deletionsdistiller/pruning/automated_gradual_pruner.py
- distiller/pruning/baidu_rnn_pruner.py 4 additions, 7 deletionsdistiller/pruning/baidu_rnn_pruner.py
- distiller/pruning/level_pruner.py 4 additions, 14 deletionsdistiller/pruning/level_pruner.py
- distiller/pruning/magnitude_pruner.py 3 additions, 9 deletionsdistiller/pruning/magnitude_pruner.py
- distiller/pruning/pruner.py 0 additions, 50 deletionsdistiller/pruning/pruner.py
- distiller/pruning/ranked_structures_pruner.py 20 additions, 22 deletionsdistiller/pruning/ranked_structures_pruner.py
- distiller/pruning/sensitivity_pruner.py 4 additions, 14 deletionsdistiller/pruning/sensitivity_pruner.py
- distiller/pruning/splicing_pruner.py 2 additions, 4 deletionsdistiller/pruning/splicing_pruner.py
- distiller/pruning/structure_pruner.py 1 addition, 3 deletionsdistiller/pruning/structure_pruner.py
- distiller/regularization/l1_regularizer.py 2 additions, 4 deletionsdistiller/regularization/l1_regularizer.py
- distiller/scheduler.py 1 addition, 1 deletiondistiller/scheduler.py
- distiller/thresholding.py 1 addition, 14 deletionsdistiller/thresholding.py
- tests/test_thresholding.py 23 additions, 1 deletiontests/test_thresholding.py
Loading
Please register or sign in to comment