class_docstr: Loss scale with a fixed value.
  
  The loss scale is not updated for the lifetime of instances of this class.
  A given instance of this class always returns the same number when called.
class_docstr_tok: ["Loss","scale","with","a","fixed","value",".","The","loss","scale","is","not","updated","for","the","lifetime","of","instances","of","this","class",".","A","given","instance","of","this","class","always","returns","the","same","number","when","called","."]
docstr: Creates the fixed loss scale.
  
  Args:
    loss_scale_value: A Python float. Its ideal value varies depending on
      models to run. Choosing a too small loss_scale might affect model
      quality; a too big loss_scale might cause inf or nan. There is no single
      right loss_scale to apply. There is no harm choosing a relatively big
      number as long as no nan or inf is encountered in training.
  
  Raises:
    ValueError: If loss_scale_value is less than 1.
docstr_tok: ["Creates","the","fixed","loss","scale",".","Args",":","loss_scale_value",":","A","Python","float",".","Its","ideal","value","varies","depending","on","models","to","run",".","Choosing","a","too","small","loss_scale","might","affect","model","quality",";","a","too","big","loss_scale","might","cause","inf","or","nan",".","There","is","no","single","right","loss_scale","to","apply",".","There","is","no","harm","choosing","a","relatively","big","number","as","long","as","no","nan","or","inf","is","encountered","in","training",".","Raises",":","ValueError",":","If","loss_scale_value","is","less","than","1","."]
code: def __init__(self, loss_scale_value):
      """Creates the fixed loss scale.
  
      Args:
        loss_scale_value: A Python float. Its ideal value varies depending on
          models to run. Choosing a too small loss_scale might affect model
          quality; a too big loss_scale might cause inf or nan. There is no single
          right loss_scale to apply. There is no harm choosing a relatively big
          number as long as no nan or inf is encountered in training.
  
      Raises:
        ValueError: If loss_scale_value is less than 1.
      """
      super(FixedLossScale, self).__init__()
      if not isinstance(loss_scale_value, (int, float)):
          raise ValueError(
              "loss_scale_value must be a Python int or float."
          )
      if loss_scale_value < 1:
          raise ValueError("loss_scale_value must be at least 1.")
      # It's important we do not create tensors in the constructor, as such
      # tensors might be on a different device or tf.function vs when the tensor
      # is used. This would hurt performance. Therefore, we do not create a tensor
      # from loss_scale_value, but instead leave it as a Python float.
      # TODO(reedwm): Also do not create tensors in the DynamicLossScale
      # constructor.
      self._loss_scale_value = float(loss_scale_value)
  
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 1 to create a new FixedLossScale object from inherited base classes: LossScale with example: obj = FixedLossScale(loss_scale_value)