Here cfg is a Dict{Symbol, Any} wrapper that mimics Matlab structs and Matlab struct methods in Julia. RedBird is a tool I ported from Matlab to differentiate. Even though the part I differentiate is in pure Julia, some of the cfg inputs still need some pre-processing from Matlab.
cfg and ∇ϕ_i∇ϕ_j should remain constant and I don't want their derivatives. I've tried many other ways (making them Const instead of Duplicated) but I still get the same error.
Also a warning that the computation does involve SparseArrays and I need a way to fix it with the make_zeros function for Enzyme to work, although I doubt this has anything to do with the error here.
I'm new to using Enzyme. I'm trying to differentiate the following piece of code:
My goal is to take the derivative of
detval
w.r.tprop
so I can optimizeprop
to match a particulardetval
(MSE loss not included here)I get the following error:
Here
cfg
is aDict{Symbol, Any}
wrapper that mimics Matlab structs and Matlab struct methods in Julia.RedBird
is a tool I ported from Matlab to differentiate. Even though the part I differentiate is in pure Julia, some of thecfg
inputs still need some pre-processing from Matlab.cfg
and∇ϕ_i∇ϕ_j
should remain constant and I don't want their derivatives. I've tried many other ways (making themConst
instead ofDuplicated
) but I still get the same error.Also a warning that the computation does involve SparseArrays and I need a way to fix it with the
make_zeros
function for Enzyme to work, although I doubt this has anything to do with the error here.Thanks in advance @wsmoses