tf.contrib.opt.AGNCustomGetter

Custom_getter class is used to do:

  1. Change trainable variables to local collection and place them at worker device
  2. Generate global variables(global center variables)
  3. Generate grad variables(gradients) which record the gradients sum and place them at worker device Notice that the class should be used with tf.replica_device_setter, so that the global center variables and global step variable can be placed at ps device.

Methods

__call__

View source

Call self as a function.

© 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/opt/AGNCustomGetter