| 105 | use_locking=self._use_locking) |
| 106 | |
| 107 | def _apply_sparse(self, grad, var): |
| 108 | accum = self.get_slot(var, "accum") |
| 109 | accum_update = self.get_slot(var, "accum_update") |
| 110 | return training_ops.sparse_apply_adadelta( |
| 111 | var, |
| 112 | accum, |
| 113 | accum_update, |
| 114 | math_ops.cast(self._lr_t, var.dtype.base_dtype), |
| 115 | math_ops.cast(self._rho_t, var.dtype.base_dtype), |
| 116 | math_ops.cast(self._epsilon_t, var.dtype.base_dtype), |
| 117 | grad.values, |
| 118 | grad.indices, |
| 119 | use_locking=self._use_locking) |
| 120 | |
| 121 | def _resource_apply_sparse(self, grad, var, indices): |
| 122 | accum = self.get_slot(var, "accum") |