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
Here's a simplified MWE that doesn't involve Turing at all. This example fails but when changing Real to Float64, it gives the correct derivative of 1.
using ReverseDiff: gradient
functionf(u)
x = (Real[1.0, 2.0] * u[], u[])
returnlast(x)
end
ReverseDiff.gradient(f, [2.0])
The error above occurs with a fresh environment containing only [email protected].
Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Failing Turing model
The below is the simplest Turing model I could get to yield the same error. I'm including it here just in case I overly simplified the MWE above.
using Turing
@model function f(x)
u ~ Uniform(0, 1)
return x * u
end
# works with Float64, as above
sample(f(Real[1.0, 2.0]), NUTS(; adtype=AutoReverseDiff()), 10)
The text was updated successfully, but these errors were encountered:
Hello! I'm passing on this error originally reported at Turing.jl: TuringLang/Turing.jl#2364
Here's a simplified MWE that doesn't involve Turing at all. This example fails but when changing
Real
toFloat64
, it gives the correct derivative of 1.Traceback
Version info
The error above occurs with a fresh environment containing only [email protected].
Failing Turing model
The below is the simplest Turing model I could get to yield the same error. I'm including it here just in case I overly simplified the MWE above.
The text was updated successfully, but these errors were encountered: