Makes it so you can always "bail out" to the underlying arrays backing various Fields and autodiff still works. This should more or less make it so anything that can be autodiff'ed in Julia you can do with Fields as long as you use the underlying arrays by hand (eventually would be ideal to get more things working directly on Fields so you dont even need to do this).
Some typical examples include making an operator for a covariance like A * Cℓ ^ γ and taking gradients w.r.t. A and γ:
I'm going to merge this and not fix the second case to return FlatMap for now. I have one possible solution but I'm going to hold off until someone actually needs it, maybe I can come up with something better.
Makes it so you can always "bail out" to the underlying arrays backing various Fields and autodiff still works. This should more or less make it so anything that can be autodiff'ed in Julia you can do with Fields as long as you use the underlying arrays by hand (eventually would be ideal to get more things working directly on Fields so you dont even need to do this).
Some typical examples include making an operator for a covariance like
A * Cℓ ^ γ
and taking gradients w.r.t.A
andγ
:Or doing some broadcasting with a Field:
(actually still need to fix that the latter case so it returns a FlatMap)
Also fixes a problem with gradients through
logdet
, which were probably not right before.