Skip to content

Commit

Permalink
rename to full_gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
epapoutsellis committed Oct 25, 2022
1 parent f06c603 commit f867d19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Wrappers/Python/cil/optimisation/functions/Function.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def __call__(self, x):

return super(SubsetSumFunction, self).__call__(x)

def _full_gradient(self, x, out=None):
def full_gradient(self, x, out=None):

r""" Computes the full gradient at :code:`x`. It is the sum of all the gradients for each function. """
return super(SubsetSumFunction, self).gradient(x, out=out)
Expand Down
2 changes: 1 addition & 1 deletion Wrappers/Python/test/test_SubsetSumFunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_call_method(self):
def test_full_gradient(self):

res1 = self.f.gradient(self.x_cil)
res2 = self.f_subset_sum_function._full_gradient(self.x_cil)
res2 = self.f_subset_sum_function.full_gradient(self.x_cil)
np.testing.assert_allclose(res1.array, res2.array, atol=1e-3)

def test_sampling_sequential(self):
Expand Down

0 comments on commit f867d19

Please sign in to comment.