docstr: Wrap an module to enable data parallel, forward method customization and buffer registeration.
  
  Parameters
  ----------
  module : pytorch module
      the module user wants to compress
  config : dict
      the configurations that users specify for compression
  module_name : str
      the name of the module to compress, wrapper module shares same name
  module_type : str
      the type of the module to compress
  pruner ： Pruner
      the pruner used to calculate mask
docstr_tok: ["Wrap","an","module","to","enable","data","parallel",",","forward","method","customization","and","buffer","registeration",".","Parameters","--","--","--","--","--","module",":","pytorch","module","the","module","user","wants","to","compress","config",":","dict","the","configurations","that","users","specify","for","compression","module_name",":","str","the","name","of","the","module","to","compress",",","wrapper","module","shares","same","name","module_type",":","str","the","type","of","the","module","to","compress","pruner","\uff1a","Pruner","the","pruner","used","to","calculate","mask"]
code: def __init__(self, module, module_name, module_type, config, pruner):
      """
      Wrap an module to enable data parallel, forward method customization and buffer registeration.
  
      Parameters
      ----------
      module : pytorch module
          the module user wants to compress
      config : dict
          the configurations that users specify for compression
      module_name : str
          the name of the module to compress, wrapper module shares same name
      module_type : str
          the type of the module to compress
      pruner ： Pruner
          the pruner used to calculate mask
      """
      super().__init__()
      # origin layer information
      self.module = module
      self.name = module_name
      self.type = module_type
      # config and pruner
      self.config = config
      self.pruner = pruner
  
      # register buffer for mask
      self.register_buffer(
          "weight_mask", torch.ones(self.module.weight.shape)
      )
      if hasattr(self.module, "bias") and self.module.bias is not None:
          self.register_buffer(
              "bias_mask", torch.ones(self.module.bias.shape)
          )
      else:
          self.register_buffer("bias_mask", None)
  
imports: import types
  import logging
  import torch
  from .None import default_layers
label_desc: Use image node_id 1 to create a new PrunerModuleWrapper object from inherited base classes: torch.nn with example: obj = PrunerModuleWrapper(module, module_name, module_type, config, pruner)