class_docstr: A structured pruning algorithm that prunes the filters with the
  smallest mean value of output activations.
  Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila and Jan Kautz,
  "Pruning Convolutional Neural Networks for Resource Efficient Inference", ICLR 2017.
  https://arxiv.org/abs/1611.06440
class_docstr_tok: ["A","structured","pruning","algorithm","that","prunes","the","filters","with","the","smallest","mean","value","of","output","activations",".","Pavlo","Molchanov",",","Stephen","Tyree",",","Tero","Karras",",","Timo","Aila","and","Jan","Kautz",",","''","Pruning","Convolutional","Neural","Networks","for","Resource","Efficient","Inference","''",",","ICLR","2017.","https",":","\/\/arxiv.org\/abs\/1611.06440"]
code: def get_mask(
      self,
      base_mask,
      weight,
      num_prune,
      wrapper,
      wrapper_idx,
      channel_masks=None,
  ):
      mean_activation = self.get_channel_sum(wrapper, wrapper_idx)
      if mean_activation is None:
          # the collected activation is not enough
          return None
      if channel_masks is not None:
          mean_activation = mean_activation * channel_masks
  
      prune_indices = torch.argsort(mean_activation)[: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 len(activations) < self.statistics_batch_num, the code
      # cannot reach here
      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 ActivationMeanRankFilterPrunerMasker 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