class_docstr: A structured pruning algorithm that prunes the filters with the smallest
  importance approximations based on the first order taylor expansion on the weight.
  Molchanov, Pavlo and Mallya, Arun and Tyree, Stephen and Frosio, Iuri and Kautz, Jan,
  "Importance Estimation for Neural Network Pruning", CVPR 2019.
  http://jankautz.com/publications/Importance4NNPruning_CVPR19.pdf
class_docstr_tok: ["A","structured","pruning","algorithm","that","prunes","the","filters","with","the","smallest","importance","approximations","based","on","the","first","order","taylor","expansion","on","the","weight",".","Molchanov",",","Pavlo","and","Mallya",",","Arun","and","Tyree",",","Stephen","and","Frosio",",","Iuri","and","Kautz",",","Jan",",","''","Importance","Estimation","for","Neural","Network","Pruning","''",",","CVPR","2019.","http",":","\/\/jankautz.com\/publications\/Importance4NNPruning_CVPR19.pdf"]
code: def get_mask(
      self,
      base_mask,
      weight,
      num_prune,
      wrapper,
      wrapper_idx,
      channel_masks=None,
  ):
      channel_contribution = self.get_channel_sum(wrapper, wrapper_idx)
      if channel_contribution is None:
          # iteration is not enough
          return None
      if channel_masks is not None:
          channel_contribution = channel_contribution * channel_masks
      prune_indices = torch.argsort(channel_contribution)[: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
      return base_mask
  
imports: import logging
  import math
  import numpy
  import torch
  from .weight_masker import WeightMasker
label_desc: Use image node_id 2 for calling the TaylorFOWeightFilterPrunerMasker 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