tensorflow / 1.15.0 / contrib / framework / assert_or_get_global_step.html /

tf.contrib.framework.assert_or_get_global_step

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.

Args
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.
Returns
A tensor suitable as a global step, or None if none was provided and none was found.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/framework/assert_or_get_global_step