class_docstr: A Wrapper for tf.train.Optimizer.
  
  Automatically takes care of:
  - Gradient averaging for multi-GPU training.
  - Gradient accumulation for arbitrarily large minibatches.
  - Dynamic loss scaling and typecasts for FP16 training.
  - Ignoring corrupted gradients that contain NaNs/Infs.
  - Reporting statistics.
  - Well-chosen default settings.
class_docstr_tok: ["A","Wrapper","for","tf.train.Optimizer",".","Automatically","takes","care","of",":","-","Gradient","averaging","for","multi-GPU","training",".","-","Gradient","accumulation","for","arbitrarily","large","minibatches",".","-","Dynamic","loss","scaling","and","typecasts","for","FP16","training",".","-","Ignoring","corrupted","gradients","that","contain","NaNs\/Infs",".","-","Reporting","statistics",".","-","Well-chosen","default","settings","."]
docstr: Get or create variable representing log2 of the current dynamic loss scaling factor.
docstr_tok: ["Get","or","create","variable","representing","log2","of","the","current","dynamic","loss","scaling","factor","."]
code: def get_loss_scaling_var(
      self, device: str
  ) -> Union[tf.Variable, None]:
      """Get or create variable representing log2 of the current dynamic loss scaling factor."""
      return self._get_device(device).loss_scaling_var
  
imports: import numpy
  import tensorflow
  from collections import OrderedDict
  from typing import List, Union
  from .None import autosummary
  from .None import tfutil
  from ..None import util
  from .tfutil import TfExpression, TfExpressionEx
label_desc: Use image node_id 6 for calling the Optimizer obj's underlying member method code with example usage: obj.get_loss_scaling_var(device) and returns: self