Sometimes I would like to "intercept" a calculation and save some intermediate results in addition to calculate the gradient of the final value. Unfortunately, this does not work:
julia> using Zygote
julia> W, b = rand(2,3), rand(2);
julia> function f!(y,x)
y .= W*x + b
sum(y)
end
f! (generic function with 1 method)
julia> y = zeros(2); x = [1,2,3];
julia> gradient(()->f!(y,x), Params([W,b]))
Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (2,)}[SSAValue(5), Core.Compiler.Argument(n=2)], i=(18,))
rec_backtrace at /buildworker/worker/package_linux64/build/src/stackwalk.c:94
record_backtrace at /buildworker/worker/package_linux64/build/src/task.c:246
jl_throw at /buildworker/worker/package_linux64/build/src/task.c:577
jl_bounds_error_ints at /buildworker/worker/package_linux64/build/src/rtutils.c:187
getindex at ./array.jl:731 [inlined]
ssa_substitute_op! at ./compiler/ssair/inlining.jl:1087
ssa_substitute_op! at ./compiler/ssair/inlining.jl:1126
ssa_substitute! at ./compiler/ssair/inlining.jl:1081 [inlined]
ir_inline_item! at ./compiler/ssair/inlining.jl:332
batch_inline! at ./compiler/ssair/inlining.jl:515
ssa_inlining_pass! at ./compiler/ssair/inlining.jl:63 [inlined]
run_passes at ./compiler/ssair/driver.jl:118
optimize at ./compiler/optimize.jl:166
typeinf at ./compiler/typeinfer.jl:35
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:342
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_eval_call at ./compiler/abstractinterpretation.jl:817
abstract_eval at ./compiler/abstractinterpretation.jl:904
typeinf_local at ./compiler/abstractinterpretation.jl:1128
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1184
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:342
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_eval_call at ./compiler/abstractinterpretation.jl:817
abstract_eval at ./compiler/abstractinterpretation.jl:904
typeinf_local at ./compiler/abstractinterpretation.jl:1128
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1184
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:342
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_eval_call at ./compiler/abstractinterpretation.jl:817
abstract_eval at ./compiler/abstractinterpretation.jl:904
typeinf_local at ./compiler/abstractinterpretation.jl:1128
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1184
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:342
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_eval_call at ./compiler/abstractinterpretation.jl:817
abstract_eval at ./compiler/abstractinterpretation.jl:904
typeinf_local at ./compiler/abstractinterpretation.jl:1128
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1184
typeinf at ./compiler/typeinfer.jl:15
typeinf_ext at ./compiler/typeinfer.jl:567
typeinf_ext at ./compiler/typeinfer.jl:604
jfptr_typeinf_ext_1.clone_1 at /home/troels/packages/julias/julia-1.0.2/lib/julia/sys.so (unknown line)
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1537 [inlined]
jl_apply_with_saved_exception_state at /buildworker/worker/package_linux64/build/src/rtutils.c:257
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:275
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1786 [inlined]
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1830
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
gradient at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface.jl:44
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:430
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:682
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:806
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f9b65adadaf)
unknown function (ip: 0x8)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:815
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:805
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622
eval at ./boot.jl:319
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
run_backend at /home/troels/.julia/packages/Revise/7ClGZ/src/Revise.jl:766
#58 at ./task.jl:259
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1537 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:268
unknown function (ip: 0xffffffffffffffff)
ERROR: Compiling Tuple{typeof(copyto!),Array{Float64,1},Int64,Array{Float64,1},Int64,Int64}: Unsupported control flow
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] merge_returns(::Core.Compiler.IRCode) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/reverse.jl:29
[3] #Primal#39(::Nothing, ::Type, ::Core.Compiler.IRCode) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/reverse.jl:193
[4] Type at ./none:0 [inlined]
[5] #Adjoint#65 at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/reverse.jl:392 [inlined]
[6] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:varargs,),Tuple{Nothing}}, ::Type{Zygote.Adjoint}, ::Core.Compiler.IRCode) at ./none:0
[7] _lookup_grad(::Type) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/emit.jl:121
[8] #s54#851 at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:17 [inlined]
[9] #s54#851(::Any, ::Any, ::Any) at ./none:0
[10] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:506
[11] copyto! at ./array.jl:277 [inlined]
[12] (::Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Array{Float64,1}},Tuple{typeof(copyto!),Array{Float64,1},Array{Float64,1},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Int64,Array{Float64,1},Int64,Int64},Tuple{typeof(copyto!)}},getfield(Zygote, Symbol("##669#676"))}})(::Nothing) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:0
[13] copyto! at ./broadcast.jl:833 [inlined]
[14] (::Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},getfield(Zygote, Symbol("##82#92")),Zygote.J{Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}}}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Int8,1},Array{Int8,1}}})(::Nothing) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:0
[15] copyto! at ./broadcast.jl:792 [inlined]
[16] (::Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},getfield(Zygote, Symbol("##82#92")),Zygote.J{Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}}}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Int8,1},Array{Int8,1}}},Zygote.J{Tuple{typeof(convert),Type{Base.Broadcast.Broadcasted{Nothing,Axes,F,Args} where Args<:Tuple where F where Axes},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(convert),UnionAll,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}}}})(::Nothing) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:0
[17] materialize! at ./broadcast.jl:751 [inlined]
[18] (::Zygote.J{Tuple{typeof(Base.Broadcast.materialize!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(Base.Broadcast.materialize!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},getfield(Zygote, Symbol("##82#92")),Zygote.J{Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}}}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Int8,1},Array{Int8,1}}},Zygote.J{Tuple{typeof(convert),Type{Base.Broadcast.Broadcasted{Nothing,Axes,F,Args} where Args<:Tuple where F where Axes},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(convert),UnionAll,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}}}},Zygote.J{Tuple{typeof(Base.Broadcast.instantiate),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(Base.Broadcast.instantiate),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(isa),Tuple{Base.OneTo{Int64}},Type{Nothing}},Tuple{typeof(isa)}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Axes,F,Args} where Args<:Tuple where F where Axes},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{UnionAll,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},Zygote.J{Tuple{typeof(Core.Typeof),typeof(identity)},Tuple{typeof(Core.Typeof),typeof(identity),Zygote.J{Tuple{typeof(isa),typeof(identity),Type{Type}},Tuple{typeof(isa)}},Array{Int8,1}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:Typeof,Zygote.Context,Module,typeof(Core.Typeof)}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Module}},getfield(Zygote, Symbol("##79#89"))}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}})(::Nothing) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:0
[19] f! at ./REPL[3]:2 [inlined]
[20] (::Zygote.J{Tuple{typeof(f!),Array{Float64,1},Array{Int64,1}},Tuple{typeof(f!),Array{Float64,1},Array{Int64,1},getfield(Zygote, Symbol("##1884#back#734")){getfield(Zygote, Symbol("##730#732")){Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast.materialize!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(Base.Broadcast.materialize!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},getfield(Zygote, Symbol("##82#92")),Zygote.J{Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}}}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Int8,1},Array{Int8,1}}},Zygote.J{Tuple{typeof(convert),Type{Base.Broadcast.Broadcasted{Nothing,Axes,F,Args} where Args<:Tuple where F where Axes},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(convert),UnionAll,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}}}},Zygote.J{Tuple{typeof(Base.Broadcast.instantiate),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(Base.Broadcast.instantiate),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(isa),Tuple{Base.OneTo{Int64}},Type{Nothing}},Tuple{typeof(isa)}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Axes,F,Args} where Args<:Tuple where F where Axes},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{UnionAll,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},Zygote.J{Tuple{typeof(Core.Typeof),typeof(identity)},Tuple{typeof(Core.Typeof),typeof(identity),Zygote.J{Tuple{typeof(isa),typeof(identity),Type{Type}},Tuple{typeof(isa)}},Array{Int8,1}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:Typeof,Zygote.Context,Module,typeof(Core.Typeof)}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Module}},getfield(Zygote, Symbol("##79#89"))}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}},getfield(Zygote, Symbol("##2068#back#842")){getfield(Zygote, Symbol("##840#841"))},getfield(Zygote, Symbol("##1624#back#620")){getfield(Zygote, Symbol("##616#618")){Tuple{Array{Float64,1},Array{Float64,1}}}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Array{Float64,1}}},getfield(Zygote, Symbol("##1932#back#759")){getfield(Zygote, Symbol("##757#758")){Array{Float64,2},Array{Int64,1}}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Array{Float64,2}}}}})(::Int8) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:0
[21] #3 at ./REPL[8]:1 [inlined]
[22] (::Zygote.J{Tuple{getfield(Main, Symbol("##3#4"))},Tuple{getfield(Main, Symbol("##3#4")),Zygote.J{Tuple{typeof(f!),Array{Float64,1},Array{Int64,1}},Tuple{typeof(f!),Array{Float64,1},Array{Int64,1},getfield(Zygote, Symbol("##1884#back#734")){getfield(Zygote, Symbol("##730#732")){Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast.materialize!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(Base.Broadcast.materialize!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(copyto!),Array{Float64,1},Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},getfield(Zygote, Symbol("##82#92")),Zygote.J{Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(Base.Broadcast._axes),Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}}}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1},Array{Int8,1},Array{Int8,1}}},Zygote.J{Tuple{typeof(convert),Type{Base.Broadcast.Broadcasted{Nothing,Axes,F,Args} where Args<:Tuple where F where Axes},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(convert),UnionAll,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}}}},Zygote.J{Tuple{typeof(Base.Broadcast.instantiate),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},Tuple{typeof(Base.Broadcast.instantiate),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Zygote.J{Tuple{typeof(isa),Tuple{Base.OneTo{Int64}},Type{Nothing}},Tuple{typeof(isa)}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:axes,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Tuple{Base.OneTo{Int64}}}},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Any,1},Array{Int8,1}}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Axes,F,Args} where Args<:Tuple where F where Axes},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{UnionAll,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},Zygote.J{Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}}},typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}}},Tuple{DataType,typeof(identity),Tuple{Array{Float64,1}},Tuple{Base.OneTo{Int64}},getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(identity),Tuple{Array{Float64,1}}},Nothing}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Base.OneTo{Int64}}},Tuple{Base.OneTo{Int64}}},Tuple{typeof(convert),DataType,Tuple{Base.OneTo{Int64}}}},Zygote.J{Tuple{typeof(convert),Type{Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}},Tuple{typeof(convert),DataType,Tuple{Array{Float64,1}}}},Zygote.J{Tuple{typeof(convert),Type{typeof(identity)},typeof(identity)},Tuple{typeof(convert),DataType,typeof(identity)}}}},Zygote.J{Tuple{typeof(Core.Typeof),typeof(identity)},Tuple{typeof(Core.Typeof),typeof(identity),Zygote.J{Tuple{typeof(isa),typeof(identity),Type{Type}},Tuple{typeof(isa)}},Array{Int8,1}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:Typeof,Zygote.Context,Module,typeof(Core.Typeof)}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Module}},getfield(Zygote, Symbol("##79#89"))}},Zygote.J{Tuple{typeof(axes),Array{Float64,1}},Tuple{typeof(axes),Array{Float64,1},Zygote.J{Tuple{typeof(map),Type{Base.OneTo},Tuple{Int64}},Tuple{typeof(map),UnionAll,Tuple{Int64},getfield(Zygote, Symbol("##160#back#114")){typeof(identity)},Zygote.J{Tuple{Type{Base.OneTo},Int64},Tuple{UnionAll,Int64,Zygote.J{Tuple{Type{Base.OneTo{Int64}},Int64},Tuple{DataType,Int64,getfield(Zygote, Symbol("##255#back#159")){Zygote.Jnew{Base.OneTo{Int64},Nothing}},getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))},getfield(Zygote, Symbol("##1480#back#570")){getfield(Zygote, Symbol("##568#569")){Int64,Int64}},Zygote.J{Tuple{typeof(zero),Type{Int64}},Tuple{typeof(zero),DataType,getfield(Zygote, Symbol("##1612#back#614")){getfield(Zygote, Symbol("##612#613"))}}}}}}},getfield(Zygote, Symbol("##172#back#120")){getfield(Zygote, Symbol("##116#118")){1,Int64}}}},getfield(Zygote, Symbol("##668#675"))}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:args,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},Tuple{Array{Float64,1}}}},getfield(Zygote, Symbol("##233#back#147")){getfield(Zygote, Symbol("#back#146")){:f,Zygote.Context,Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}},typeof(identity)}}}},getfield(Zygote, Symbol("##2068#back#842")){getfield(Zygote, Symbol("##840#841"))},getfield(Zygote, Symbol("##1624#back#620")){getfield(Zygote, Symbol("##616#618")){Tuple{Array{Float64,1},Array{Float64,1}}}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Array{Float64,1}}},getfield(Zygote, Symbol("##1932#back#759")){getfield(Zygote, Symbol("##757#758")){Array{Float64,2},Array{Int64,1}}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Array{Float64,2}}}}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Array{Int64,1}}},getfield(Zygote, Symbol("##148#back#112")){getfield(Zygote, Symbol("##110#111")){Zygote.Context,Array{Float64,1}}}}})(::Int8) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface2.jl:0
[23] (::getfield(Zygote, Symbol("##70#71")))(::Any) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface.jl:76
[24] gradient(::Function, ::Params) at /home/troels/.julia/packages/Zygote/HvFbo/src/compiler/interface.jl:44
[25] top-level scope at none:0
works just fine.