class_docstr: Parameters
  ----------
  model : torch.nn.Module
      Model to be pruned
  config_list : list
      Supported keys:
          - sparsity : This is to specify the sparsity operations to be compressed to.
          - op_types : Only BatchNorm2d is supported in Slim Pruner.
  optimizer: torch.optim.Optimizer
          Optimizer used to train model
class_docstr_tok: ["Parameters","--","--","--","--","--","model",":","torch.nn.Module","Model","to","be","pruned","config_list",":","list","Supported","keys",":","-","sparsity",":","This","is","to","specify","the","sparsity","operations","to","be","compressed","to",".","-","op_types",":","Only","BatchNorm2d","is","supported","in","Slim","Pruner",".","optimizer",":","torch.optim.Optimizer","Optimizer","used","to","train","model"]
code: def __init__(self, model, config_list, optimizer=None):
      super().__init__(
          model,
          config_list,
          pruning_algorithm="slim",
          optimizer=optimizer,
      )
  
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 SlimPruner object from inherited base classes: OneshotPruner with example: obj = SlimPruner(model, config_list, optimizer)