ForwardDiff.jl
ForwardDiff.jl copied to clipboard
Forward Mode Automatic Differentiation for Julia
Here is the MWE: ```julia using ForwardDiff using SpecialFunctions log_i0(z::Number) = besseli(0,z) |> log ForwardDiff.jacobian(x -> log_i0.(x), [1.1, 2.2, 3.3]) ``` REPL output: ```julia ERROR: LoadError: StackOverflowError: Stacktrace: [1] besselix(nu::Int64,...
So I'm not sure if it was intended to be, but I'm finding that if I generate a configuration as ``` cfg = ForwardDiff.GradientConfig(...) ``` and then use this in...
Needed for Zygote on ChainRules 1.0 (only the `Float64` case strictly speaking) Similar to the recently merged https://github.com/JuliaDiff/ForwardDiff.jl/pull/508/files
This needs quite well testing for downstream users to ensure regressions haven't crept in due to the implementation in SIMD.jl.
I don't have a MWE, but I hit this error on 0.6.2, not master. ``` ERROR: Cannot determine ordering of Dual tags ForwardDiff.Tag{#nLLp#38,Float64} and ForwardDiff.Tag{Base.Serializer.__deserialized_types__.#nLLp#38,Float64} Stacktrace: [1] extract_gradient_chunk!(::Type{ForwardDiff.Tag{#nLLp#38,Float64}}, ::Array{Float64,1}, ::ForwardDiff.Dual{ForwardDiff.Tag{Base.Serializer.__deserialized_types__.#nLLp#38,Float64},Float64,8},...
Only implemented enough so that the benchmark in https://github.com/JuliaDiff/ForwardDiff.jl/pull/555 can be tested. Putting it up here in case people want to play with it. Results of the benchmark in #555:...
Hi all, ForwardDiff incorrectly computes the Hessian of three-argument-dot. Cook up some (any) square matrix julia> H = [1 2 3; 4 5 6; 7 8 9]; Compute Hessian of...
This is a start towards an official API for fixing https://github.com/JuliaDiff/ForwardDiff.jl/issues/89. It provides macros for derivatives, gradients and jacobians such that user defined derivatives are easily injected: ```jl julia> f(x)...
It seems like this should work. All that is needed is: ```jl Base.big(x::Dual{T}) where {T} = Dual{T}(big(x.value), big(x.partials)) Base.big(p::Partials) = Partials(big.(p.values)) ``` (Mentioned [on discourse](https://discourse.julialang.org/t/optim-jl-cant-optimize-function-which-includes-bigfloat-variables/65095).)
This is one of those love/hate changes...in brief, it allows one to set up alternate rules for how the "epsilon" component of dual numbers behaves by changing the type of...