We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 108cbc8 commit 0860fe4Copy full SHA for 0860fe4
src/utils.jl
@@ -610,12 +610,15 @@ end
610
611
function _restructure(m, xs)
612
i = 0
613
- fmap(m) do x
+ m̄ = fmap(m) do x
614
x isa AbstractArray || return x
615
x = reshape(xs[i.+(1:length(x))], size(x))
616
i += length(x)
617
return x
618
end
619
+
620
+ length(xs) == i || @warn "Expected $(i) params, got $(length(xs))"
621
+ return m̄
622
623
624
@adjoint function _restructure(m, xs)
0 commit comments