class_docstr: _StructuredFilterPruner has two ways to calculate the masks
  for conv layers. In the normal way, the _StructuredFilterPruner
  will calculate the mask of each layer separately. For example, each
  conv layer determine which filters should be pruned according to its L1
  norm. In constrast, in the dependency-aware way, the layers that in a
  dependency group will be pruned jointly and these layers will be forced
  to prune the same channels.
class_docstr_tok: ["_StructuredFilterPruner","has","two","ways","to","calculate","the","masks","for","conv","layers",".","In","the","normal","way",",","the","_StructuredFilterPruner","will","calculate","the","mask","of","each","layer","separately",".","For","example",",","each","conv","layer","determine","which","filters","should","be","pruned","according","to","its","L1","norm",".","In","constrast",",","in","the","dependency-aware","way",",","the","layers","that","in","a","dependency","group","will","be","pruned","jointly","and","these","layers","will","be","forced","to","prune","the","same","channels","."]
code: def __init__(
      self,
      model,
      config_list,
      pruning_algorithm,
      optimizer=None,
      dependency_aware=False,
      dummy_input=None,
      **algo_kwargs,
  ):
      super().__init__(
          model,
          config_list,
          pruning_algorithm=pruning_algorithm,
          optimizer=optimizer,
          **algo_kwargs,
      )
      self.dependency_aware = dependency_aware
      # set the dependency-aware switch for the masker
      self.masker.dependency_aware = dependency_aware
      self.dummy_input = dummy_input
      if self.dependency_aware:
          errmsg = "When dependency_aware is set, the dummy_input should not be None"
          assert self.dummy_input is not None, errmsg
          # Get the TorchModuleGraph of the target model
          # to trace the model, we need to unwrap the wrappers
          self._unwrap_model()
          self.graph = TorchModuleGraph(model, dummy_input)
          self._wrap_model()
          self.channel_depen = ChannelDependency(
              traced_model=self.graph.trace
          )
          self.group_depen = GroupDependency(
              traced_model=self.graph.trace
          )
          self.channel_depen = self.channel_depen.dependency_sets
          self.channel_depen = {
              name: sets for sets in self.channel_depen for name in sets
          }
          self.group_depen = self.group_depen.dependency_sets
  
imports: import logging
  from schema import And, Optional, SchemaError
  from .._graph_utils import TorchModuleGraph
  from ..utils.shape_dependency import ChannelDependency, GroupDependency
  from .constants import MASKER_DICT
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Pruner
label_desc: Use image node_id 1 to create a new _StructuredFilterPruner object from inherited base classes: OneshotPruner with example: obj = _StructuredFilterPruner(model, config_list, pruning_algorithm, optimizer, dependency_aware, dummy_input)