Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Example using tf.control_dependencies:
- update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
- with tf.control_dependencies(update_ops):
- train_op = optimiser.minimize(loss)
- # Example using tf.group:
- update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
- minimize = optimizer.minimize(loss)
- train_op = tf.group([minimize, update_ops])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement