From 39fe9f903827dcb6e74ce6504d682067d9690925 Mon Sep 17 00:00:00 2001 From: Christian Guinard Date: Sun, 28 Aug 2022 16:33:57 -0300 Subject: [PATCH] Add extra test for params (#2051) * Add extra test for params * Update test/utils.jl Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com> --- test/utils.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/utils.jl b/test/utils.jl index 9394732b37..6662427e80 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -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