class_docstr: Parameters
  ----------
  model : pytorch model
      The model to be pruned
  config_list : list
      Supported keys:
          - prune_iterations : The number of rounds for the iterative pruning.
          - sparsity : The final sparsity when the compression is done.
  optimizer : pytorch optimizer
      The optimizer for the model
  lr_scheduler : pytorch lr scheduler
      The lr scheduler for the model if used
  reset_weights : bool
      Whether reset weights and optimizer at the beginning of each round.
class_docstr_tok: ["Parameters","--","--","--","--","--","model",":","pytorch","model","The","model","to","be","pruned","config_list",":","list","Supported","keys",":","-","prune_iterations",":","The","number","of","rounds","for","the","iterative","pruning",".","-","sparsity",":","The","final","sparsity","when","the","compression","is","done",".","optimizer",":","pytorch","optimizer","The","optimizer","for","the","model","lr_scheduler",":","pytorch","lr","scheduler","The","lr","scheduler","for","the","model","if","used","reset_weights",":","bool","Whether","reset","weights","and","optimizer","at","the","beginning","of","each","round","."]
docstr: Generate mask for the given ``weight``.
  
  Parameters
  ----------
  wrapper : Module
      The layer to be pruned
  
  Returns
  -------
  tensor
      The mask for this weight, it is ```None``` because this pruner
      calculates and assigns masks in ```prune_iteration_start```,
      no need to do anything in this function.
docstr_tok: ["Generate","mask","for","the","given","``","weight","``",".","Parameters","--","--","--","--","--","wrapper",":","Module","The","layer","to","be","pruned","Returns","--","--","--","-","tensor","The","mask","for","this","weight",",","it","is","``","`","None","``","`","because","this","pruner","calculates","and","assigns","masks","in","``","`","prune_iteration_start","``","`",",","no","need","to","do","anything","in","this","function","."]
code: def calc_mask(self, wrapper, **kwargs):
      """
      Generate mask for the given ``weight``.
  
      Parameters
      ----------
      wrapper : Module
          The layer to be pruned
  
      Returns
      -------
      tensor
          The mask for this weight, it is ```None``` because this pruner
          calculates and assigns masks in ```prune_iteration_start```,
          no need to do anything in this function.
      """
      return None
  
file_path: auptimizer/src/aup/compression/torch/pruning/lottery_ticket.py
imports: import copy
  import logging
  import torch
  from schema import And, Optional
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Pruner
  from .finegrained_pruning import LevelPrunerMasker
label_desc: Use image node_id 5 for calling the LotteryTicketPruner obj's underlying member method code with example usage: obj.calc_mask(wrapper) and returns: None