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

Integration with Zygote #129

Open
GrigorySarnitsky opened this issue Oct 10, 2022 · 0 comments
Open

Integration with Zygote #129

GrigorySarnitsky opened this issue Oct 10, 2022 · 0 comments

Comments

@GrigorySarnitsky
Copy link

GrigorySarnitsky commented Oct 10, 2022

I was trying out Zygote and was testing how it plays with Measurements, see also a cross post in Zygote's github (FluxML/Zygote.jl#1320). I have encountered a problem when I try to take a second derivative:

using Zygote
using Measurements

(√)''(2 ± 0.1)

This throws an exception:

MethodError: no method matching Float64(::Measurement{Float64})

At the same time (√)''(2) works just fine. I can fix this by defining

Float64(x::Measurement{Float64}) = Measurements.value(x)

I know little about Zygote and Measurments and I cannot tell what is going on and if this needs fixing and on which side.

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

No branches or pull requests

1 participant