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_channel_sum(self, wrapper, wrapper_idx):
      assert wrapper_idx is not None
      activations = self.pruner.collected_activation[wrapper_idx]
      if len(activations) < self.statistics_batch_num:
          return None
      # the memory overhead here is acceptable, because only
      # the mean_activation tensor returned by _cal_mean_activation
      # is transfer to gpu.
      return self._cal_mean_activation(activations).to(
          wrapper.module.weight.device
      )
  
imports: import logging
  import math
  import numpy
  import torch
  from .weight_masker import WeightMasker
label_desc: Use image node_id 3 for calling the ActivationMeanRankFilterPrunerMasker obj's underlying member method code with example usage: obj.get_channel_sum(wrapper, wrapper_idx) and returns: self, None