Skip to content

Commit

Permalink
Add extra test for params (#2051)
Browse files Browse the repository at this point in the history
* Add extra test for params

* Update test/utils.jl

Co-authored-by: Michael Abbott <[email protected]>

Co-authored-by: Michael Abbott <[email protected]>
  • Loading branch information
christiangnrd and mcabbott authored Aug 28, 2022
1 parent 6c747f3 commit 39fe9f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ end
r = Any[nothing,m]
r[1] = r
@test size.(params(r)) == [(5, 10), (5, 5), (5,), (5, 1)]

# Ensure functor explores inside Transpose but not SubArray
m = (x = view([1,2,3]pi, 1:2), y = transpose([4 5]pi))
@test size.(Flux.params(m)) == [(2,), (1, 2)]
end

@testset "Precision" begin
Expand Down

0 comments on commit 39fe9f9

Please sign in to comment.