I am attempting to use the ForwardDiff.jl and / or ReverseDiff.jl libraries for computing the gradient in an optimization problem.
Both of these packages give me an error message related to ::getfield().
ReverseDiff gives me a LoadError:
MethodError: no method matching (::getfield(CalibrationModule, Symbol("#f#4"))
{AlgorithmParameters,ModelParameters,Guess,Array{Float64,1}})
(::ReverseDiff.TrackedArray{Float64,Float64,1,Array{Float64,1},Array{Float64,1}})
ForwardDiff gives me a LoadError:
MethodError: no method matching (::getfield(CalibrationModule, Symbol("#f#10"))
{AlgorithmParameters,ModelParameters,Guess,Array{Float64,1}})
(::Array{ForwardDiff.Dual{ForwardDiff.Tag{getfield(CalibrationModule,
Symbol("#f#10"))
{AlgorithmParameters,ModelParameters,Guess,Array{Float64,1}},Float64},Float64,6},1})
I have no idea how to make sense of this error message. My code is too complicated to post here, but as far as I can tell I am not using any libraries not written in Julia. I do extensively use custom data types (mutable structs) throughout, but I don't see why this would cause a problem...