class_docstr: Loss scale that dynamically adjusts itself.
  
  Dynamic loss scaling works by adjusting the loss scale as training progresses.
  The goal is to keep the loss scale as high as possible without overflowing the
  gradients. As long as the gradients do not overflow, raising the loss scale
  never hurts.
  
  The algorithm starts by setting the loss scale to an initial value. Every N
  steps that the gradients are finite, the loss scale is increased by some
  factor. However, if a NaN or Inf gradient is found, the gradients for that
  step are not applied, and the loss scale is decreased by the factor. This
  process tends to keep the loss scale as high as possible without gradients
  overflowing.
class_docstr_tok: ["Loss","scale","that","dynamically","adjusts","itself",".","Dynamic","loss","scaling","works","by","adjusting","the","loss","scale","as","training","progresses",".","The","goal","is","to","keep","the","loss","scale","as","high","as","possible","without","overflowing","the","gradients",".","As","long","as","the","gradients","do","not","overflow",",","raising","the","loss","scale","never","hurts",".","The","algorithm","starts","by","setting","the","loss","scale","to","an","initial","value",".","Every","N","steps","that","the","gradients","are","finite",",","the","loss","scale","is","increased","by","some","factor",".","However",",","if","a","NaN","or","Inf","gradient","is","found",",","the","gradients","for","that","step","are","not","applied",",","and","the","loss","scale","is","decreased","by","the","factor",".","This","process","tends","to","keep","the","loss","scale","as","high","as","possible","without","gradients","overflowing","."]
code: def increment_period(self):
      return self._increment_period
  
imports: import abc
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import reduce_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.trackable import base
  from tensorflow.python.util import deprecation
  from tensorflow.python.util import nest
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling the DynamicLossScale obj's underlying member method code with example usage: obj.increment_period() and returns: self