From 05fcb99a4a618eb63cc9280a2df52a33899a84dc Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 6 Sep 2022 12:23:03 -0300 Subject: [PATCH 1/2] Fix the failing CI build --- test/utils.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/utils.jl b/test/utils.jl index a5f3fb2aac..cbaa4ef323 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -1,7 +1,7 @@ using Flux using Flux: throttle, nfan, glorot_uniform, glorot_normal, kaiming_normal, kaiming_uniform, orthogonal, truncated_normal, - sparse_init, identity_init, stack, unstack, batch, unbatch, + sparse_init, identity_init, unstack, batch, unbatch, unsqueeze, params, loadparams!, loadmodel! using StatsBase: var, std using Statistics, LinearAlgebra @@ -326,14 +326,14 @@ end @testset "Stacking" begin x = randn(3,3) - stacked = stack([x, x], dims=2) + stacked = Flux.MLUtils.stack([x, x], dims=2) @test size(stacked) == (3,2,3) stacked_array=[ 8 9 3 5; 9 6 6 9; 9 1 7 2; 7 4 10 6 ] unstacked_array=[[8, 9, 9, 7], [9, 6, 1, 4], [3, 6, 7, 10], [5, 9, 2, 6]] @test unstack(stacked_array, dims=2) == unstacked_array - @test stack(unstacked_array, dims=2) == stacked_array - @test stack(unstack(stacked_array, dims=1), dims=1) == stacked_array + @test Flux.MLUtils.stack(unstacked_array, dims=2) == stacked_array + @test Flux.MLUtils.stack(unstack(stacked_array, dims=1), dims=1) == stacked_array end @testset "Batching" begin From fb195049d0ada81c9974b23889aff178e2757b51 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 7 Sep 2022 12:15:32 -0300 Subject: [PATCH 2/2] Clean up fixed tests --- test/utils.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/utils.jl b/test/utils.jl index cbaa4ef323..92cf9e862b 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -3,6 +3,7 @@ using Flux: throttle, nfan, glorot_uniform, glorot_normal, kaiming_normal, kaiming_uniform, orthogonal, truncated_normal, sparse_init, identity_init, unstack, batch, unbatch, unsqueeze, params, loadparams!, loadmodel! +using MLUtils using StatsBase: var, std using Statistics, LinearAlgebra using Random @@ -326,14 +327,14 @@ end @testset "Stacking" begin x = randn(3,3) - stacked = Flux.MLUtils.stack([x, x], dims=2) + stacked = MLUtils.stack([x, x], dims=2) @test size(stacked) == (3,2,3) stacked_array=[ 8 9 3 5; 9 6 6 9; 9 1 7 2; 7 4 10 6 ] unstacked_array=[[8, 9, 9, 7], [9, 6, 1, 4], [3, 6, 7, 10], [5, 9, 2, 6]] @test unstack(stacked_array, dims=2) == unstacked_array - @test Flux.MLUtils.stack(unstacked_array, dims=2) == stacked_array - @test Flux.MLUtils.stack(unstack(stacked_array, dims=1), dims=1) == stacked_array + @test MLUtils.stack(unstacked_array, dims=2) == stacked_array + @test MLUtils.stack(unstack(stacked_array, dims=1), dims=1) == stacked_array end @testset "Batching" begin