Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra fixes for ChainRulesCore @1.0 #1039

Merged
merged 7 commits into from
Jul 23, 2021
Merged

Extra fixes for ChainRulesCore @1.0 #1039

merged 7 commits into from
Jul 23, 2021

Conversation

mzgubic
Copy link
Collaborator

@mzgubic mzgubic commented Jul 23, 2021

Merging into @oxinabox s branch (can't push directly to his branch as I don't have permissions on this repo).

two errors remain:

Params nesting: Error During Test at /Users/mzgubic/JuliaEnvs/Zygote.jl/test/interface.jl:176
diagonal hessian: Error During Test at /Users/mzgubic/JuliaEnvs/Zygote.jl/test/utils.jl:22

@@ -18,7 +18,7 @@ using Zygote, Test, LinearAlgebra
@test gradient(x -> real(logabsdet(x)[1]), [1 2im; 3im 4])[1] ≈ [4 3im; 2im 1]/10

# https://github.com/FluxML/Zygote.jl/issues/705
@test gradient(x -> imag(sum(exp, x)), [1,2,3])[1] ≈ im .* exp.(1:3)
@test gradient(x -> imag(sum(exp, x)), [1,2,3])[1] ≈ real(im .* exp.(1:3))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it

@@ -449,12 +449,12 @@ end
@test pullback(type_test)[1] == Complex{<:Real}

@testset "Pairs" begin
@test (x->10*pairs((a=x, b=2))[1])'(100) === 10
@test (x->10*pairs((a=x, b=2))[1])'(100) === 10.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure I love it.

test/gradcheck.jl Outdated Show resolved Hide resolved
@oxinabox
Copy link
Member

merging this in to the other PR.

@oxinabox oxinabox merged commit f3ebf9e into FluxML:ox/cr1 Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants