Skip to content
Snippets Groups Projects
  • Neta Zmora's avatar
    54a5867e
    Activation statistics collection (#61) · 54a5867e
    Neta Zmora authored
    Activation statistics can be leveraged to make pruning and quantization decisions, and so
    We added support to collect these data.
    - Two types of activation statistics are supported: summary statistics, and detailed records 
    per activation.
    Currently we support the following summaries: 
    - Average activation sparsity, per layer
    - Average L1-norm for each activation channel, per layer
    - Average sparsity for each activation channel, per layer
    
    For the detailed records we collect some statistics per activation and store it in a record.  
    Using this collection method generates more detailed data, but consumes more time, so
    Beware.
    
    * You can collect activation data for the different training phases: training/validation/test.
    * You can access the data directly from each module that you chose to collect stats for.  
    * You can also create an Excel workbook with the stats.
    
    To demonstrate use of activation collection we added a sample schedule which prunes 
    weight filters by the activation APoZ according to:
    "Network Trimming: A Data-Driven Neuron Pruning Approach towards 
    Efficient Deep Architectures",
    Hengyuan Hu, Rui Peng, Yu-Wing Tai, Chi-Keung Tang, ICLR 2016
    https://arxiv.org/abs/1607.03250
    
    We also refactored the AGP code (AutomatedGradualPruner) to support structure pruning,
    and specifically we separated the AGP schedule from the filter pruning criterion.  We added
    examples of ranking filter importance based on activation APoZ (ActivationAPoZRankedFilterPruner),
    random (RandomRankedFilterPruner), filter gradients (GradientRankedFilterPruner), 
    and filter L1-norm (L1RankedStructureParameterPruner)
    Activation statistics collection (#61)
    Neta Zmora authored
    Activation statistics can be leveraged to make pruning and quantization decisions, and so
    We added support to collect these data.
    - Two types of activation statistics are supported: summary statistics, and detailed records 
    per activation.
    Currently we support the following summaries: 
    - Average activation sparsity, per layer
    - Average L1-norm for each activation channel, per layer
    - Average sparsity for each activation channel, per layer
    
    For the detailed records we collect some statistics per activation and store it in a record.  
    Using this collection method generates more detailed data, but consumes more time, so
    Beware.
    
    * You can collect activation data for the different training phases: training/validation/test.
    * You can access the data directly from each module that you chose to collect stats for.  
    * You can also create an Excel workbook with the stats.
    
    To demonstrate use of activation collection we added a sample schedule which prunes 
    weight filters by the activation APoZ according to:
    "Network Trimming: A Data-Driven Neuron Pruning Approach towards 
    Efficient Deep Architectures",
    Hengyuan Hu, Rui Peng, Yu-Wing Tai, Chi-Keung Tang, ICLR 2016
    https://arxiv.org/abs/1607.03250
    
    We also refactored the AGP code (AutomatedGradualPruner) to support structure pruning,
    and specifically we separated the AGP schedule from the filter pruning criterion.  We added
    examples of ranking filter importance based on activation APoZ (ActivationAPoZRankedFilterPruner),
    random (RandomRankedFilterPruner), filter gradients (GradientRankedFilterPruner), 
    and filter L1-norm (L1RankedStructureParameterPruner)
This project manages its dependencies using pip. Learn more