diff --git a/test/cuda/layers.jl b/test/cuda/layers.jl index e08a7b60d3..7eb42813b9 100644 --- a/test/cuda/layers.jl +++ b/test/cuda/layers.jl @@ -291,6 +291,6 @@ end @test Array(y_g) == y gs = gradient(() -> sum(m(x)), params(m)) gs_g = gradient(() -> sum(m_g(x_g)), params(m_g)) - @test collect(gs_g[m_g.weight]) ≈ gs[m.weight] + @test Array(gs_g[m_g.weight]) ≈ gs[m.weight] end end