Advertisement
Guest User

Untitled

a guest
Aug 12th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.83 KB | None | 0 0
  1. DomainError with -9.892202109140928:
  2. log will only return a complex result if called with a complex argument. Try log(Complex(x)).
  3.  
  4. Stacktrace:
  5. [1] throw_complex_domainerror(::Symbol, ::Float64) at ./math.jl:33
  6. [2] log(::Float64) at ./special/log.jl:285
  7. [3] log at /home/kv/.julia/packages/ForwardDiff/sdToQ/src/dual.jl:203 [inlined]
  8. [4] derivative! at /home/kv/.julia/packages/ForwardDiff/sdToQ/src/derivative.jl:46 [inlined]
  9. [5] unary_scalar_forward_exec!(::typeof(log), ::ReverseDiff.TrackedReal{Float64,Float64,Nothing}, ::ReverseDiff.TrackedReal{Float64,Float64,Nothing}, ::Base.RefValue{Float64}) at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/derivatives/scalars.jl:91
  10. [6] scalar_forward_exec!(::ReverseDiff.ScalarInstruction{typeof(log),ReverseDiff.TrackedReal{Float64,Float64,Nothing},ReverseDiff.TrackedReal{Float64,Float64,Nothing},Base.RefValue{Float64}}) at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/derivatives/scalars.jl:81
  11. [7] forward_exec!(::ReverseDiff.ScalarInstruction{typeof(log),ReverseDiff.TrackedReal{Float64,Float64,Nothing},ReverseDiff.TrackedReal{Float64,Float64,Nothing},Base.RefValue{Float64}}) at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/tape.jl:82
  12. [8] ForwardExecutor at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/api/tape.jl:76 [inlined]
  13. [9] (::FunctionWrappers.CallWrapper{Nothing})(::ReverseDiff.ForwardExecutor{ReverseDiff.ScalarInstruction{typeof(log),ReverseDiff.TrackedReal{Float64,Float64,Nothing},ReverseDiff.TrackedReal{Float64,Float64,Nothing},Base.RefValue{Float64}}}) at /home/kv/.julia/packages/FunctionWrappers/OAZAk/src/FunctionWrappers.jl:37
  14. [10] macro expansion at /home/kv/.julia/packages/FunctionWrappers/OAZAk/src/FunctionWrappers.jl:109 [inlined]
  15. [11] do_ccall at /home/kv/.julia/packages/FunctionWrappers/OAZAk/src/FunctionWrappers.jl:100 [inlined]
  16. [12] FunctionWrapper at /home/kv/.julia/packages/FunctionWrappers/OAZAk/src/FunctionWrappers.jl:116 [inlined]
  17. [13] forward_pass!(::ReverseDiff.CompiledTape{ReverseDiff.GradientTape{Turing.Core.var"#f#36"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}}},ReverseDiff.TrackedArray{Float64,Float64,1,Array{Float64,1},Array{Float64,1}},ReverseDiff.TrackedReal{Float64,Float64,ReverseDiff.TrackedArray{Float64,Float64,1,Array{Float64,1},Array{Float64,1}}}}}) at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/api/tape.jl:124
  18. [14] seeded_forward_pass! at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/api/tape.jl:42 [inlined]
  19. [15] gradient! at /home/kv/.julia/packages/ReverseDiff/uy0uk/src/api/gradients.jl:79 [inlined]
  20. [16] gradient_logp at /home/kv/.julia/packages/Turing/GMBTf/src/core/compat/reversediff.jl:70 [inlined]
  21. [17] gradient_logp at /home/kv/.julia/packages/Turing/GMBTf/src/core/ad.jl:78 [inlined]
  22. [18] ∂logπ∂θ at /home/kv/.julia/packages/Turing/GMBTf/src/inference/hmc.jl:474 [inlined]
  23. [19] ∂H∂θ(::AdvancedHMC.Hamiltonian{AdvancedHMC.DiagEuclideanMetric{Float64,Array{Float64,1}},Turing.Inference.var"#logπ#55"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}},Turing.Inference.var"#∂logπ∂θ#54"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}}}, ::Array{Float64,1}) at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/hamiltonian.jl:31
  24. [20] macro expansion at /home/kv/.julia/packages/UnPack/1IjJI/src/UnPack.jl:100 [inlined]
  25. [21] step(::AdvancedHMC.Leapfrog{Float64}, ::AdvancedHMC.Hamiltonian{AdvancedHMC.DiagEuclideanMetric{Float64,Array{Float64,1}},Turing.Inference.var"#logπ#55"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}},Turing.Inference.var"#∂logπ∂θ#54"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}}}, ::AdvancedHMC.PhasePoint{Array{Float64,1},AdvancedHMC.DualValue{Float64,Array{Float64,1}}}, ::Int64; fwd::Bool, full_trajectory::Val{false}) at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/integrator.jl:78
  26. [22] step at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/integrator.jl:56 [inlined] (repeats 2 times)
  27. [23] A at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/trajectory.jl:698 [inlined]
  28. [24] find_good_stepsize(::Random._GLOBAL_RNG, ::AdvancedHMC.Hamiltonian{AdvancedHMC.DiagEuclideanMetric{Float64,Array{Float64,1}},Turing.Inference.var"#logπ#55"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}},Turing.Inference.var"#∂logπ∂θ#54"{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64},DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}},DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}}}, ::Array{Float64,1}; max_n_iters::Int64) at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/trajectory.jl:722
  29. [25] #find_good_stepsize#13 at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/trajectory.jl:778 [inlined]
  30. [26] find_good_stepsize at /home/kv/.julia/packages/AdvancedHMC/P9wqk/src/trajectory.jl:778 [inlined]
  31. [27] Turing.Inference.HMCState(::DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}, ::DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}}, ::Random._GLOBAL_RNG; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/kv/.julia/packages/Turing/GMBTf/src/inference/hmc.jl:628
  32. [28] Turing.Inference.HMCState(::DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}, ::DynamicPPL.Sampler{NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric},Turing.Inference.SamplerState{DynamicPPL.VarInfo{NamedTuple{(:vec_raw,),Tuple{DynamicPPL.Metadata{Dict{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},Int64},Array{Truncated{Laplace{Float64},Continuous,Float64},1},Array{DynamicPPL.VarName{:vec_raw,Tuple{Tuple{Int64}}},1},Array{Float64,1},Array{Set{DynamicPPL.Selector},1}}}},Float64}}}, ::Random._GLOBAL_RNG) at /home/kv/.julia/packages/Turing/GMBTf/src/inference/hmc.jl:609
  33. [29] DynamicPPL.Sampler(::NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric}, ::DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}, ::DynamicPPL.Selector) at /home/kv/.julia/packages/Turing/GMBTf/src/inference/hmc.jl:384
  34. [30] Sampler at /home/kv/.julia/packages/Turing/GMBTf/src/inference/hmc.jl:376 [inlined]
  35. [31] sample(::Random._GLOBAL_RNG, ::DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}, ::NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric}, ::Int64; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/kv/.julia/packages/Turing/GMBTf/src/inference/Inference.jl:163
  36. [32] sample at /home/kv/.julia/packages/Turing/GMBTf/src/inference/Inference.jl:163 [inlined]
  37. [33] #sample#1 at /home/kv/.julia/packages/Turing/GMBTf/src/inference/Inference.jl:153 [inlined]
  38. [34] sample(::DynamicPPL.Model{var"###evaluator#565",(:y, :A, :T),Tuple{Array{Float64,1},Array{Float64,2},Type{Array{Float64,1}}},(),DynamicPPL.ModelGen{var"###generator#566",(:y, :A, :T),(:T,),Tuple{Type{Array{Float64,1}}}}}, ::NUTS{Turing.Core.ReverseDiffAD{true},(),AdvancedHMC.DiagEuclideanMetric}, ::Int64) at /home/kv/.julia/packages/Turing/GMBTf/src/inference/Inference.jl:153
  39. [35] top-level scope at In[3]:29
  40.  
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement