Change to array due to "type definition not allowed inside a local scope"
This commit is contained in:
parent
16d5f2bc24
commit
9b96a3d69b
|
@ -90,11 +90,10 @@ end
|
|||
c = Chain(m, m)
|
||||
@test size.(params(c)) == [(5, 10), (5, 5), (5,), (5,)]
|
||||
|
||||
# Recursive struct. Just want params, no stack overflow pls.
|
||||
mutable struct R m;r end
|
||||
Flux.@treelike R
|
||||
r = R(m, nothing)
|
||||
r.r = r
|
||||
# Self-referential array. Just want params, no stack overflow pls.
|
||||
r = Any[nothing,m]
|
||||
Flux.children(a::Vector{Any}) = Tuple(a)
|
||||
r[1] = r
|
||||
@test size.(params(r)) == [(5, 10), (5, 5), (5,), (5,)]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue