ChainRules.jl
ChainRules.jl copied to clipboard
forward and reverse mode automatic differentiation primitives for Julia Base + StdLibs
Something changed at some point and now one of the unzip tests fail because wrong type is being returned. I suspect a bug fix upstream and we were overconstraining type...
Simple example of taking the jacobian of identity, but idently is implemeted as a copy: ```julia julia> import Diffractor julia> import AbstractDifferentiation as AD julia> AD.jacobian(Diffractor.DiffractorForwardBackend(), copy, rand(2)) ERROR: Attempted...
This causes problems with Zygote: ```julia julia> using Zygote julia> gradient(x -> sum([x x]), pi/2) (2.0,) julia> gradient(x -> sum(Float32[x x]), pi/2) ERROR: Mutating arrays is not supported -- called...
Hi, it seems that the `rrule` for `mean(f, x)` is not vectorized and thus does not place nicely with CUDA: ```julia using Zygote, CUDA, Statistics julia> gradient(y -> mean(x ->...
This might not be a bug, but at the least it seems to be a mysterious error. I'm using Flux and in the loss function (which is processed by Zygote...
The following works with a dense vector or with an integer power, but not with both: ```julia julia> using SparseArrays, Zygote julia> f(x) = x .^ 2; julia> g(x) =...
With Julia 1.9 `eachslice` enables to properly drop dimension when taking a reduction function over some dimension (at least based on JuliaLang/julia#16606). However, having implemented this, it seems multiple dimensions...
This is the branch I created to address #697 . But I can't find the problem. so for now don't merge this
If I repeatedly run the example below, I get the wrong result for the gradient through `exp!` about half of the time. ```julia using LinearAlgebra, ForwardDiff, FiniteDiff, ForwardDiffChainRules @ForwardDiff_frule LinearAlgebra.exp!(x1::AbstractMatrix{