def _get_directions(self):
        directions = OrderedDict()

        for i, (param, gradient) in enumerate(self.loss.gradients.items()):
            # mean_squared_grad := E[g^2]_{t-1}
            param_name = param.name if param.name is not None else str(i)
            mean_squared_grad = sharedX(np.zeros_like(param.get_value()), name='mean_squared_grad_' + param_name)
            self.mean_squared_grads.append(mean_squared_grad)
            # mean_squared_dx := E[(\Delta x)^2]_{t-1}
            param_name = param.name if param.name is not None else str(i)
            mean_squared_dx = sharedX(np.zeros_like(param.get_value()), name='mean_squared_dx_' + param_name)
            self.mean_squared_dxs.append(mean_squared_dx)

            # Accumulate gradient
            new_mean_squared_grad = self.dc * mean_squared_grad + (1 - self.dc) * T.sqr(gradient)

            # Compute update
            rms_dx_tm1 = T.sqrt(mean_squared_dx + self.eps)
            rms_grad_t = T.sqrt(new_mean_squared_grad + self.eps)
            delta_x_t = -(rms_dx_tm1/rms_grad_t) * gradient

            # Accumulate updates
            new_mean_squared_dx = self.dc * mean_squared_dx + (1 - self.dc) * T.sqr(delta_x_t)

            # Apply update
            self._updates[mean_squared_grad] = new_mean_squared_grad
            self._updates[mean_squared_dx] = new_mean_squared_dx
            directions[param] = delta_x_t

        return directions
Find out if a particular line changed in this commit's
dataset/ETHPy150Open SMART-Lab/smartlearner/smartlearner/optimizers/adadelta.py/Adadelta._get_directions--crossover with--dataset/ETHPy150Open markstory/lint-review/lintreview/diff.py/Diff.has_line_changed