Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Oct 18, 2024
1 parent d18fe13 commit 6f35f2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@ end
m = Dense(10 => 5)
@test size.(params(m)) == [(5, 10), (5,)]
m = RNN(10 => 5)
@test size.(params(m)) == [(5, 10), (5, 5), (5,), (5, 1)]
@test size.(params(m)) == [(5, 10), (5, 5), (5,)]

# Layer duplicated in same chain, params just once pls.
c = Chain(m, m)
@test size.(params(c)) == [(5, 10), (5, 5), (5,), (5, 1)]
@test size.(params(c)) == [(5, 10), (5, 5), (5,)]

# Self-referential array. Just want params, no stack overflow pls.
r = Any[nothing,m]
r[1] = r
@test size.(params(r)) == [(5, 10), (5, 5), (5,), (5, 1)]
@test size.(params(r)) == [(5, 10), (5, 5), (5,)]

# Ensure functor explores inside Transpose but not SubArray
m = (x = view([1,2,3]pi, 1:2), y = transpose([4 5]pi))
Expand Down

0 comments on commit 6f35f2d

Please sign in to comment.