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 validate_config(self, model, config_list):
      schema = CompressorSchema(
          [
              {
                  "sparsity": And(float, lambda n: 0 < n < 1),
                  "op_types": ["BatchNorm2d"],
                  Optional("op_names"): [str],
              }
          ],
          model,
          logger,
      )
  
      schema.validate(config_list)
  
      if len(config_list) > 1:
          logger.warning("Slim pruner only supports 1 configuration")
  
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 2 for calling the SlimPruner obj's underlying member method code with example usage: obj.validate_config(model, config_list) without return types