@KrisThielemans requested changes on this pull request.
In src/xSTIR/pSTIR/tests/tests_qp_lc_rdp.py:
> @@ -61,6 +62,41 @@ def Hessian_test(test, prior, x, eps=1e-3):
test.check_if_less(q, .01*eps)
+def Hessian_diagonal_test(test, prior, x, eps=1e-4):
+ """Checks compute_Hessian_diagonal against numerical finite differences.
+
+ For a subset of interior voxels i, checks:
+ H_diag[i] ≈ (grad_i(x + eps*e_i) - grad_i(x)) / eps
+ """
+ H_diag = prior.compute_Hessian_diagonal(x)
+ gx = prior.gradient(x.clone())
why the clone? gradient doesn't modify the argument
> @@ -2623,6 +2623,7 @@ def compute_Hessian_diagonal(self, image):
"""Computes the diagonal of Hessian"""
let's change this to
⬇️ Suggested change- """Computes the diagonal of Hessian""" + """Returns the diagonal of Hessian"""
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@ColomboMatte0 pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Why did you remove subprocess again? It looked like a good idea to me. (I can't seem to find the Codacy complaint)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It was missing before but i cannot understand why the cudacy check complains about it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@ColomboMatte0 pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
let's ignore Codacy and use your human intelligence :-)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
ok i added it back.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
oh, it just doesn't like subprocess at all. I presume we could disable this check, but life is short.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans approved this pull request.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()