()
| 202 | update_slot_op = tf.group(update_counter, *ops, name='update_slot') |
| 203 | |
| 204 | def update_grad(): |
| 205 | update_op = self._opt.apply_gradients(slots_and_vars) |
| 206 | with tf.control_dependencies([update_op]): |
| 207 | clear_ops = [tfv1.assign(s, tf.zeros_like(s)) for s in slots] |
| 208 | return tf.group(*clear_ops, name='update_grad') |
| 209 | |
| 210 | pred = tf.equal(tfv1.mod(counter, self._niter), 0) |
| 211 | with tf.control_dependencies([update_slot_op]): |
nothing calls this directly
no test coverage detected