TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now


View source on GitHub

Verifies that a global step tensor is valid or gets one if None is given.


If global_step_tensor is not None, check that it is a valid global step tensor (using assert_global_step). Otherwise find a global step tensor using get_global_step and return it.


  • graph: The graph to find the global step tensor for.
  • global_step_tensor: The tensor to check for suitability as a global step. If None is given (the default), find a global step tensor.


A tensor suitable as a global step, or None if none was provided and none was found.