ForwardDiff.jl
ForwardDiff.jl copied to clipboard
Forward Mode Automatic Differentiation for Julia
The SIMD tests are currently failing on Travis. At least for a period, they passed locally so, in any case, we need the tests to be more reliable on CI....
The method ``` ForwardDiff.jacobian(f!, y::AbstractArray, x::AbstractArray) ``` throws `UndefRefError` when `y` contains undefined references. For example, ``` using ForwardDiff f!(y, x) = copy!(y, x) x0 = BigFloat[1.0, 1.0] ForwardDiff.jacobian(f!, similar(x0),...
The function `SpecialFunctions.gamma_inc` goes into infinite recursion when used with ForwardDiff.Duals. MWE: ```julia using ForwardDiff, SpecialFunctions julia> f = x -> gamma_inc(x, 1.0, 1) julia> f(ForwardDiff.Dual(1.0, 1.0)) ERROR: StackOverflowError: Stacktrace:...
Some packages such as `DifferentialEquations.jl` require you to manually provide `Dual` numbers for trickier problems. When you have nested differentiation in such a situation you also need to provide ordering...
```julia julia> x, pf = frule(sin, 0.0) (0.0, ChainRules.var"#83#sin_pushforward#59"{Float64}(0.0)) julia> pf(Zero(), Partials((1.0,))) 1-element Partials{1,Float64}: Error showing value of type Partials{1,Float64}: ERROR: MethodError: no method matching getindex(::Tuple{Float64}, ::Int64, ::Int64) ``` yeah...
Hi! I'm having some troubles using nested inplace jacobian: ``` using ForwardDiff using LinearAlgebra #some data x0 = randn(50000); p0 = randn(2); #pre allocate outputs out = similar(x0); outjac =...
`x^0` is special-cased [here](https://github.com/JuliaDiff/ForwardDiff.jl/blob/c374b69f47095aef60a5486065ddc6fe29c32e9f/src/dual.jl#L469) (see https://github.com/JuliaDiff/ForwardDiff.jl/issues/331) Could `x^1` also be special-cased a couple of lines later? Currently it instead calculates `1 * x^0`. When `x == 0` that relies on...
I naively tried `ForwardDiff.gradient(det, A)` and compared it to the output of `(det(A) * inv(A))' * A)`([Jacobi's Formula](https://en.wikipedia.org/wiki/Jacobi's_formula) for a real square matrix `A`. They should be the same value,...
I'm converting a C++ program that uses FADBAD++ to Julia and I've noticed that this library is restricted to only taking derivatives of functions of the form `f(x::Real)::Union{Real,AbstractArray}`. Specifically `x::Real`....
Unitful and ForwardDiff don't play well together. But it would be good if they did! stripping the units out of a model to run ForwardDiff for a jacobian etc. isn't...