Skip to content
Snippets Groups Projects
  1. Apr 20, 2020
    • Neta Zmora's avatar
      small tensor masking API refactoring (#499) · 68514d17
      Neta Zmora authored
      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).
      68514d17
  2. Oct 06, 2019
    • Neta Zmora's avatar
      Low-level pruning API refactor (#401) · 05d5592e
      Neta Zmora authored
      Some refactoring of the low-level pruning API
      
      Added distiller/norms.py - for calculating norms of various sub-tensors.
      
      ranked_structures_pruner.py:
      -Removed l1_magnitude, l2_magnitude. Use instead distiller.norms.l1_norm
      -Lots of refactoring
      -replaced LpRankedStructureParameterPruner.ch_binary_map_to_mask with
      distiller.thresholding.expand_binary_map
      -FMReconstructionChannelPruner.rank_and_prune_channels used L2-norm
      by default and now uses L1-norm (i.e.magnitude_fn=l2_magnitude was
      replaced with magnitude_fn=distiller.norms.l1_norm)
      
      thresholding.py:
      -Delegated lots of the work to the new norms.py.
      -Removed support for 4D (entire convolution layers) since that has not been
      maintained for a longtime. This may break some old scripts that remove entire
      layers.
      -added expand_binary_map() explicitly so others can use it. Might need to
      move to a different file
      -removed threshold_policy()
      
      utils.py:
      -use distiller.norms.xxx for sparsity stats
      05d5592e
  3. Apr 08, 2019
  4. Aug 07, 2018
Loading