class_docstr: A structured pruning algorithm that prunes the filters with the
  smallest APoZ(average percentage of zeros) of output activations.
  Hengyuan Hu, Rui Peng, Yu-Wing Tai and Chi-Keung Tang,
  "Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures", ICLR 2016.
  https://arxiv.org/abs/1607.03250
class_docstr_tok: ["A","structured","pruning","algorithm","that","prunes","the","filters","with","the","smallest","APoZ","(","average","percentage","of","zeros",")","of","output","activations",".","Hengyuan","Hu",",","Rui","Peng",",","Yu-Wing","Tai","and","Chi-Keung","Tang",",","''","Network","Trimming",":","A","Data-Driven","Neuron","Pruning","Approach","towards","Efficient","Deep","Architectures","''",",","ICLR","2016.","https",":","\/\/arxiv.org\/abs\/1607.03250"]
code: def get_mask(
      self,
      base_mask,
      weight,
      num_prune,
      wrapper,
      wrapper_idx,
      channel_masks=None,
  ):
      apoz = self.get_channel_sum(wrapper, wrapper_idx)
      if apoz is None:
          # the collected activations are not enough
          return None
      if channel_masks is not None:
          apoz = apoz * channel_masks
  
      prune_indices = torch.argsort(apoz)[:num_prune]
      for idx in prune_indices:
          base_mask["weight_mask"][idx] = 0.0
          if base_mask["bias_mask"] is not None:
              base_mask["bias_mask"][idx] = 0.0
  
      if self.pruner.hook_id in self.pruner._fwd_hook_handles:
          self.pruner.remove_activation_collector(self.pruner.hook_id)
  
      return base_mask
  
imports: import logging
  import math
  import numpy
  import torch
  from .weight_masker import WeightMasker
label_desc: Use image node_id 1 for calling the ActivationAPoZRankFilterPrunerMasker obj's underlying member method code with example usage: obj.get_mask(base_mask, weight, num_prune, wrapper, wrapper_idx, channel_masks) and returns: base_mask, None