Skip to content

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


# 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


@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.

@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