class_docstr: A structured pruning algorithm that prunes the filters with the
  smallest L2 norm of the weights.
class_docstr_tok: ["A","structured","pruning","algorithm","that","prunes","the","filters","with","the","smallest","L2","norm","of","the","weights","."]
code: def get_mask(
      self,
      base_mask,
      weight,
      num_prune,
      wrapper,
      wrapper_idx,
      channel_masks=None,
  ):
      # get the l2-norm sum for each filter
      w_l2_norm = self.get_channel_sum(wrapper, wrapper_idx)
      if channel_masks is not None:
          # if we need to mask some channels in advance
          w_l2_norm = w_l2_norm * channel_masks
      threshold = torch.topk(
          w_l2_norm.view(-1), num_prune, largest=False
      )[0].max()
      mask_weight = (
          torch.gt(w_l2_norm, threshold)[:, None, None, None]
          .expand_as(weight)
          .type_as(weight)
      )
      mask_bias = (
          torch.gt(w_l2_norm, 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 L2FilterPrunerMasker 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