You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a cross post from Measurements github (JuliaPhysics/Measurements.jl#129). I don't know what's going on, I post it here in case it uncovers some deficiencies of Zygote. In particular, what is the role of that missing method (see below)?
UPD The most concise example that gives the ``MethodError`:
using Zygote
using Measurements
(x -> 2 * x)'(2 ± 0.1)
I was trying out Zygote and was testing how it plays with Measurements. I have encountered a problem when I try to take a second derivative:
(√)''(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
This is a cross post from Measurements github (JuliaPhysics/Measurements.jl#129). I don't know what's going on, I post it here in case it uncovers some deficiencies of Zygote. In particular, what is the role of that missing method (see below)?
UPD The most concise example that gives the ``MethodError`:
I was trying out Zygote and was testing how it plays with Measurements. I have encountered a problem when I try to take a second derivative:
This throws an exception:
MethodError: no method matching Float64(::Measurement{Float64})
At the same time
(√)''(2)
works just fine. I can fix this by definingFloat64(x::Measurement{Float64}) = Measurements.value(x)
I know little about Zygote and Measurements and I cannot tell what is going on and if this needs fixing and on which side.
ForwardDiff works correctly:
The text was updated successfully, but these errors were encountered: