class_docstr: Pruning Schedule with a PolynomialDecay function.
class_docstr_tok: ["Pruning","Schedule","with","a","PolynomialDecay","function","."]
docstr: Initializes a Pruning schedule with a PolynomialDecay function.
  
  Pruning rate grows rapidly in the beginning from initial_sparsity, but then
  plateaus slowly to the target sparsity. The function applied is
  
  current_sparsity = final_sparsity + (initial_sparsity - final_sparsity)
        * (1 - (step - begin_step)/(end_step - begin_step)) ^ exponent
  
  which is a polynomial decay function. See
  [paper](https://arxiv.org/abs/1710.01878).
  
  Args:
    initial_sparsity: Sparsity (%) at which pruning begins.
    final_sparsity: Sparsity (%) at which pruning ends.
    begin_step: Step at which to begin pruning.
    end_step: Step at which to end pruning.
    power: Exponent to be used in the sparsity function.
    frequency: Only apply pruning every `frequency` steps.
docstr_tok: ["Initializes","a","Pruning","schedule","with","a","PolynomialDecay","function",".","Pruning","rate","grows","rapidly","in","the","beginning","from","initial_sparsity",",","but","then","plateaus","slowly","to","the","target","sparsity",".","The","function","applied","is","current_sparsity","=","final_sparsity","+","(","initial_sparsity","-","final_sparsity",")","*","(","1","-","(","step","-","begin_step",")","\/","(","end_step","-","begin_step",")",")","^","exponent","which","is","a","polynomial","decay","function",".","See","[","paper","]","(","https",":","\/\/arxiv.org\/abs\/1710.01878",")",".","Args",":","initial_sparsity",":","Sparsity","(","%",")","at","which","pruning","begins",".","final_sparsity",":","Sparsity","(","%",")","at","which","pruning","ends",".","begin_step",":","Step","at","which","to","begin","pruning",".","end_step",":","Step","at","which","to","end","pruning",".","power",":","Exponent","to","be","used","in","the","sparsity","function",".","frequency",":","Only","apply","pruning","every","`","frequency","`","steps","."]
code: def __init__(
      self,
      initial_sparsity,
      final_sparsity,
      begin_step,
      end_step,
      power=3,
      frequency=100,
  ):
      """Initializes a Pruning schedule with a PolynomialDecay function.
  
      Pruning rate grows rapidly in the beginning from initial_sparsity, but then
      plateaus slowly to the target sparsity. The function applied is
  
      current_sparsity = final_sparsity + (initial_sparsity - final_sparsity)
            * (1 - (step - begin_step)/(end_step - begin_step)) ^ exponent
  
      which is a polynomial decay function. See
      [paper](https://arxiv.org/abs/1710.01878).
  
      Args:
        initial_sparsity: Sparsity (%) at which pruning begins.
        final_sparsity: Sparsity (%) at which pruning ends.
        begin_step: Step at which to begin pruning.
        end_step: Step at which to end pruning.
        power: Exponent to be used in the sparsity function.
        frequency: Only apply pruning every `frequency` steps.
      """
  
      self.initial_sparsity = initial_sparsity
      self.final_sparsity = final_sparsity
      self.power = power
  
      self.begin_step = begin_step
      self.end_step = end_step
      self.frequency = frequency
  
      self._validate_step(
          self.begin_step, self.end_step, self.frequency, False
      )
      self._validate_sparsity(initial_sparsity, "initial_sparsity")
      self._validate_sparsity(final_sparsity, "final_sparsity")
  
imports: import abc
  import six
  import tensorflow
label_desc: Use image node_id 1 to create a new PolynomialDecay object from inherited base classes: PruningSchedule with example: obj = PolynomialDecay(initial_sparsity, final_sparsity, begin_step, end_step, power, frequency)