Conversation
Codecov Report
@@ Coverage Diff @@
## main #3 +/- ##
=======================================
Coverage 98.80% 98.80%
=======================================
Files 6 6
Lines 84 84
=======================================
Hits 83 83
Misses 1 1 Continue to review full report at Codecov.
|
|
I don't understand why the chain rule tests are failing. Let's look at the isotropic Gaussian PSF as an example Here is the definition of the gradient Lines 67 to 77 in 1b026c5 which I wrote out by hand and can be verified with this derivation http://umdberg.pbworks.com/w/page/88516931/Example%3A%20Gradient%20of%20a%20Gaussian here are the chain rules Lines 94 to 111 in 1b026c5 using them works as intended- using ChainRulescore, PSFModels
psf = PSFModels.Gaussian(fwhm=10)
point = [1, 2]
f, pullback = rrule(psf, point)
Δpsf, Δpoint = pullback(1.0)
f2, Δf = frule((Δpsf, Δpoint), psf, point)
# output
(0.8705505632961241, 0.7817442466933209)but using Lines 99 to 111 in 1b026c5 |
|
The merge commits mostly tried to make the code runnable, but I don't think it still works with ChainRuleCore's newer API. The code needs to be reworked to comply |
This PR adds analytical gradients using ChainRulesCore.jl