tf.contrib.training.RandomStrategy
Returns a random PS task for op placement.
tf.contrib.training.RandomStrategy( num_ps_tasks, seed=0 )
This may perform better than the default round-robin placement if you have a large number of variables. Depending on your architecture and number of parameter servers, round-robin can lead to situations where all of one type of variable is placed on a single PS task, which may lead to contention issues.
This strategy uses a hash function on the name of each op for deterministic placement.
Methods
__call__
__call__( op )
Chooses a ps task index for the given Operation
.
© 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/training/RandomStrategy