class_docstr: A structured pruning algorithm that prunes the filters of smallest magnitude
  weights sum in the convolution layers to achieve a preset level of network sparsity.
  Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet and Hans Peter Graf,
  "PRUNING FILTERS FOR EFFICIENT CONVNETS", 2017 ICLR
  https://arxiv.org/abs/1608.08710
class_docstr_tok: ["A","structured","pruning","algorithm","that","prunes","the","filters","of","smallest","magnitude","weights","sum","in","the","convolution","layers","to","achieve","a","preset","level","of","network","sparsity",".","Hao","Li",",","Asim","Kadav",",","Igor","Durdanovic",",","Hanan","Samet","and","Hans","Peter","Graf",",","''","PRUNING","FILTERS","FOR","EFFICIENT","CONVNETS","''",",","2017","ICLR","https",":","\/\/arxiv.org\/abs\/1608.08710"]
code: def get_mask(
      self,
      base_mask,
      weight,
      num_prune,
      wrapper,
      wrapper_idx,
      channel_masks=None,
  ):
      # get the l1-norm sum for each filter
      w_abs_structured = self.get_channel_sum(wrapper, wrapper_idx)
      if channel_masks is not None:
          # if we need to mask some channels in advance
          w_abs_structured = w_abs_structured * channel_masks
      threshold = torch.topk(
          w_abs_structured.view(-1), num_prune, largest=False
      )[0].max()
      mask_weight = (
          torch.gt(w_abs_structured, threshold)[:, None, None, None]
          .expand_as(weight)
          .type_as(weight)
      )
      mask_bias = (
          torch.gt(w_abs_structured, threshold).type_as(weight).detach()
          if base_mask["bias_mask"] is not None
          else None
      )
  
      return {
          "weight_mask": mask_weight.detach(),
          "bias_mask": mask_bias,
      }
  
imports: import logging
  import math
  import numpy
  import torch
  from .weight_masker import WeightMasker
label_desc: Use image node_id 1 for calling the L1FilterPrunerMasker obj's underlying member method code with example usage: obj.get_mask(base_mask, weight, num_prune, wrapper, wrapper_idx, channel_masks) and returns: dict