Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.random.get_seed

View source on GitHub

Returns the local seeds an operation should use given an op-specific seed.

Aliases:

  • tf.compat.v1.get_seed
  • tf.compat.v1.random.get_seed
  • tf.get_seed
tf.random.get_seed(op_seed)

Given operation-specific seed, op_seed, this helper function returns two seeds derived from graph-level and op-level seeds. Many random operations internally use the two seeds to allow user to change the seed globally for a graph, or for only specific operations.

For details on how the graph-level seed interacts with op seeds, see tf.compat.v1.random.set_random_seed.

Args:

  • op_seed: integer.

Returns:

A tuple of two integers that should be used for the local seed of this operation.