class_docstr: Pruning schedule with constant sparsity(%) throughout training.
class_docstr_tok: ["Pruning","schedule","with","constant","sparsity","(","%",")","throughout","training","."]
docstr: Initializes a Pruning schedule with constant sparsity.
  
  Sparsity is applied in the interval [`begin_step`, `end_step`] every
  `frequency` steps. At each applicable step, the sparsity(%) is constant.
  
  Args:
    target_sparsity: A scalar float representing the target sparsity value.
    begin_step: Step at which to begin pruning.
    end_step: Step at which to end pruning. `-1` by default. `-1` implies
      continuing to prune till the end of training.
    frequency: Only apply pruning every `frequency` steps.
docstr_tok: ["Initializes","a","Pruning","schedule","with","constant","sparsity",".","Sparsity","is","applied","in","the","interval","[","`","begin_step","`",",","`","end_step","`","]","every","`","frequency","`","steps",".","At","each","applicable","step",",","the","sparsity","(","%",")","is","constant",".","Args",":","target_sparsity",":","A","scalar","float","representing","the","target","sparsity","value",".","begin_step",":","Step","at","which","to","begin","pruning",".","end_step",":","Step","at","which","to","end","pruning",".","`","-1","`","by","default",".","`","-1","`","implies","continuing","to","prune","till","the","end","of","training",".","frequency",":","Only","apply","pruning","every","`","frequency","`","steps","."]
code: def __init__(
      self, target_sparsity, begin_step, end_step=-1, frequency=100
  ):
      """Initializes a Pruning schedule with constant sparsity.
  
      Sparsity is applied in the interval [`begin_step`, `end_step`] every
      `frequency` steps. At each applicable step, the sparsity(%) is constant.
  
      Args:
        target_sparsity: A scalar float representing the target sparsity value.
        begin_step: Step at which to begin pruning.
        end_step: Step at which to end pruning. `-1` by default. `-1` implies
          continuing to prune till the end of training.
        frequency: Only apply pruning every `frequency` steps.
      """
  
      self.target_sparsity = target_sparsity
      self.begin_step = begin_step
      self.end_step = end_step
      self.frequency = frequency
  
      self._validate_step(
          self.begin_step, self.end_step, self.frequency, True
      )
      self._validate_sparsity(target_sparsity, "target_sparsity")
  
imports: import abc
  import six
  import tensorflow
label_desc: Use image node_id 1 to create a new ConstantSparsity object from inherited base classes: PruningSchedule with example: obj = ConstantSparsity(target_sparsity, begin_step, end_step, frequency)