ForwardDiff.jl
ForwardDiff.jl copied to clipboard
Forward Mode Automatic Differentiation for Julia
Hello, Recently i came across with a problem in which already had a hessian cache, (`HessianConfig` + `DiffResults.HessianResult`), but it seems there aren't any methods for calculating for using `HessianConfig`...
At the moment values/partials give useless (and probably "wrong") answers for complex-duals: ```julia julia> ForwardDiff.value(ForwardDiff.Dual(1,2) + im*ForwardDiff.Dual(3,4)) Dual{Nothing}(1,2) + Dual{Nothing}(3,4)*im julia> ForwardDiff.value(ForwardDiff.Dual(1,2) + im*ForwardDiff.Dual(3,4)) Dual{Nothing}(1,2) + Dual{Nothing}(3,4)*im julia> ForwardDiff.partials(ForwardDiff.Dual(1,2) +...
Hi everyone, As documented in #726, #514, #653 ForwardDiff encounters some difficulty when it comes to differentiating complex functions. The issue is similar to the one in #481 . This...
The following code works: ```jl using ForwardDiff g(x) = [[x^2, sqrt(x)]] println(ForwardDiff.derivative(g, 2)) ``` But this code: ```jl using DiffResults using ForwardDiff g(x) = [[x^2, sqrt(x)]] result = DiffResults.DiffResult(similar(g(2)), similar(g(2)))...
This fixes #714: ``` Testing Running tests... Tag count of Dual{ForwardDiff.Tag{FDPrecompilationIssue.var"#3#4"{Int64}, Int64}}(0,1) is 1 Tag count of Dual{ForwardDiff.Tag{FDPrecompilationIssue.var"#1#2"{ForwardDiff.Dual{ForwardDiff.Tag{FDPrecompilationIssue.var"#3#4"{Int64}, Int64}, Int64, 1}}, ForwardDiff.Dual{ForwardDiff.Tag{FDPrecompilationIssue.var"#3#4"{Int64}, Int64}, Int64, 1}}}(Dual{ForwardDiff.Tag{FDPrecompilationIssue.var"#3#4"{Int64}, Int64}}(0,0),Dual{ForwardDiff.Tag{FDPrecompilationIssue.var"#3#4"{Int64}, Int64}}(0,2)) is 2 Testing...
When calculating hessians with DiffResults and StaticArrays there are unexpected allocations: ``` using DiffResults, ForwardDiff, StaticArrays, BenchmarkTools g = r -> (r[1]^2 - 3) * (r[2]^2 - 2); x =...
Hi, I found an issue when working with precompilation and nested derivatives. The tag count system is setup such that the inner derivative receives a tag with a higher `tagcount`...