added update_gradints_diag to the add and base kernels

This commit is contained in:
James Hensman 2014-03-10 11:14:19 +00:00
parent 38b05e571c
commit 603733c6f7
2 changed files with 7 additions and 0 deletions

View file

@ -45,6 +45,9 @@ class Add(Kern):
else:
[p.update_gradients_full(dL_dK, X[:,i_s], X2[:, i_s]) for p, i_s in zip(self._parameters_, self.input_slices)]
def update_gradients_diag(self, dL_dKdiag, X):
[p.update_gradients_diag(dL_dK, X[:,i_s]) for p, i_s in zip(self._parameters_, self.input_slices)]
def gradients_X(self, dL_dK, X, X2=None):
"""Compute the gradient of the objective function with respect to X.