@@ -3,6 +3,7 @@ using Flux: throttle, nfan, glorot_uniform, glorot_normal,
33 kaiming_normal, kaiming_uniform, orthogonal, truncated_normal,
44 sparse_init, identity_init, unstack, batch, unbatch,
55 unsqueeze, params, loadparams!, loadmodel!
6+ using MLUtils
67using StatsBase: var, std
78using Statistics, LinearAlgebra
89using Random
@@ -326,14 +327,14 @@ end
326327
327328@testset " Stacking" begin
328329 x = randn (3 ,3 )
329- stacked = Flux . MLUtils. stack ([x, x], dims= 2 )
330+ stacked = MLUtils. stack ([x, x], dims= 2 )
330331 @test size (stacked) == (3 ,2 ,3 )
331332
332333 stacked_array= [ 8 9 3 5 ; 9 6 6 9 ; 9 1 7 2 ; 7 4 10 6 ]
333334 unstacked_array= [[8 , 9 , 9 , 7 ], [9 , 6 , 1 , 4 ], [3 , 6 , 7 , 10 ], [5 , 9 , 2 , 6 ]]
334335 @test unstack (stacked_array, dims= 2 ) == unstacked_array
335- @test Flux . MLUtils. stack (unstacked_array, dims= 2 ) == stacked_array
336- @test Flux . MLUtils. stack (unstack (stacked_array, dims= 1 ), dims= 1 ) == stacked_array
336+ @test MLUtils. stack (unstacked_array, dims= 2 ) == stacked_array
337+ @test MLUtils. stack (unstack (stacked_array, dims= 1 ), dims= 1 ) == stacked_array
337338end
338339
339340@testset " Batching" begin
0 commit comments