Created
August 8, 2021 14:12
-
-
Save dpo/7544d5c680995d4634cab19a2cdccfd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> jprod_rev(F, rand(5), rand(5)) | |
ERROR: DimensionMismatch("arrays could not be broadcast to a common size; got a dimension with lengths 5 and 6") | |
Stacktrace: | |
[1] _bcs1 | |
@ ./broadcast.jl:501 [inlined] | |
[2] _bcs | |
@ ./broadcast.jl:495 [inlined] | |
[3] broadcast_shape(::Tuple{Base.OneTo{Int64}}, ::Tuple{Base.OneTo{Int64}}) | |
@ Base.Broadcast ./broadcast.jl:489 | |
[4] combine_axes | |
@ ./broadcast.jl:484 [inlined] | |
[5] _axes | |
@ ./broadcast.jl:209 [inlined] | |
[6] axes | |
@ ./broadcast.jl:207 [inlined] | |
[7] copy | |
@ ./broadcast.jl:1095 [inlined] | |
[8] materialize | |
@ ./broadcast.jl:883 [inlined] | |
[9] special_reverse_exec!(instruction::ReverseDiff.SpecialInstruction{typeof(DiffEqBase.solve_up), Tuple{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, ReverseDiff.TrackedArray{Float64, Int64, 1, Vector{Float64}, Vector{Int64}}, ODEFunction{true, typeof(ODE), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Nothing, Vector{Float64}, ReverseDiff.TrackedArray{Float64, Int64, 1, Vector{Float64}, Vector{Int64}}, Vern9}, ReverseDiff.TrackedArray{Float64, Float64, 2, Matrix{Float64}, Matrix{Float64}}, Tuple{DiffEqSensitivity.var"#forward_sensitivity_backpass#231"{0, Float64, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, typeof(ODE), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Vern9, ForwardDiffSensitivity{0, nothing}, Vector{Float64}, Vector{Float64}, Tuple{}, UnitRange{Int64}}, DiffEqBase.var"##solve_up#257#222"{DiffEqBase.var"##solve_up#257#221#223"}, NamedTuple{(:saveat,), Tuple{Float64}}}}) | |
@ DiffEqBase ~/.julia/packages/ReverseDiff/E4Tzn/src/macros.jl:218 | |
[10] reverse_exec!(instruction::ReverseDiff.SpecialInstruction{typeof(DiffEqBase.solve_up), Tuple{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, ReverseDiff.TrackedArray{Float64, Int64, 1, Vector{Float64}, Vector{Int64}}, ODEFunction{true, typeof(ODE), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Nothing, Vector{Float64}, ReverseDiff.TrackedArray{Float64, Int64, 1, Vector{Float64}, Vector{Int64}}, Vern9}, ReverseDiff.TrackedArray{Float64, Float64, 2, Matrix{Float64}, Matrix{Float64}}, Tuple{DiffEqSensitivity.var"#forward_sensitivity_backpass#231"{0, Float64, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, typeof(ODE), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Vern9, ForwardDiffSensitivity{0, nothing}, Vector{Float64}, Vector{Float64}, Tuple{}, UnitRange{Int64}}, DiffEqBase.var"##solve_up#257#222"{DiffEqBase.var"##solve_up#257#221#223"}, NamedTuple{(:saveat,), Tuple{Float64}}}}) | |
@ ReverseDiff ~/.julia/packages/ReverseDiff/E4Tzn/src/tape.jl:93 | |
[11] reverse_pass!(tape::Vector{ReverseDiff.AbstractInstruction}) | |
@ ReverseDiff ~/.julia/packages/ReverseDiff/E4Tzn/src/tape.jl:87 | |
[12] reverse_pass! | |
@ ~/.julia/packages/ReverseDiff/E4Tzn/src/api/tape.jl:36 [inlined] | |
[13] seeded_reverse_pass!(result::Matrix{Int64}, output::ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, input::ReverseDiff.TrackedArray{Int64, Int64, 1, Vector{Int64}, Vector{Int64}}, tape::ReverseDiff.JacobianTape{var"#17#18"{typeof(F), Vector{Float64}, Vector{Float64}}, ReverseDiff.TrackedArray{Int64, Int64, 1, Vector{Int64}, Vector{Int64}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}) | |
@ ReverseDiff ~/.julia/packages/ReverseDiff/E4Tzn/src/api/utils.jl:51 | |
[14] seeded_reverse_pass! | |
@ ~/.julia/packages/ReverseDiff/E4Tzn/src/api/tape.jl:47 [inlined] | |
[15] jacobian! | |
@ ~/.julia/packages/ReverseDiff/E4Tzn/src/api/jacobians.jl:122 [inlined] | |
[16] jacobian!(tape::ReverseDiff.JacobianTape{var"#17#18"{typeof(F), Vector{Float64}, Vector{Float64}}, ReverseDiff.TrackedArray{Int64, Int64, 1, Vector{Int64}, Vector{Int64}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}, input::Vector{Int64}) | |
@ ReverseDiff ~/.julia/packages/ReverseDiff/E4Tzn/src/api/jacobians.jl:106 | |
[17] jacobian(f::Function, input::Vector{Int64}, cfg::ReverseDiff.JacobianConfig{ReverseDiff.TrackedArray{Int64, Int64, 1, Vector{Int64}, Vector{Int64}}, Nothing}) | |
@ ReverseDiff ~/.julia/packages/ReverseDiff/E4Tzn/src/api/jacobians.jl:25 | |
[18] jacobian | |
@ ~/.julia/packages/ReverseDiff/E4Tzn/src/api/jacobians.jl:23 [inlined] | |
[19] jprod_rev(f::typeof(F), x::Vector{Float64}, u::Vector{Float64}) | |
@ Main ./REPL[15]:1 | |
[20] top-level scope | |
@ REPL[16]:1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment