()
| 94 | name = 'UPDATE_OPS' if collection == tf.GraphKeys.UPDATE_OPS else collection |
| 95 | |
| 96 | def f(): |
| 97 | ops = tf.get_collection(collection) |
| 98 | if ops: |
| 99 | logger.info("Applying collection {} of {} ops.".format(name, len(ops))) |
| 100 | return tf.group(*ops, name='update_ops') |
| 101 | else: |
| 102 | return tf.no_op(name='empty_update_ops') |
| 103 | |
| 104 | super(RunUpdateOps, self).__init__( |
| 105 | f, run_before=False, run_as_trigger=False, run_step=True) |
no test coverage detected