Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Feb 4, 2025
1 parent 7a6bcbb commit 146f600
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/batch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ end
@test bs[4] == [1.0 0.0 0.0; 1.0 0.0 0.0]
end

@test "batch_sequences" begin
y = batchseqs([[1, 2, 3], [10, 20]])
@testset "batch_sequences" begin
y = batch_sequence([[1, 2, 3], [10, 20]])
@test y isa Matrix{Int}
@test y == [1 10; 2 20; 3 0]

data = (ones(2, 1), fill(2.0, (2, 3)))
y = batchseqs(data, pad=-1)
y = batch_sequence(data, pad=-1)
@test y[:,:,1] == [1 -1 -1; 1 -1 -1]
@test y[:,:,2] == [2 2 2; 2 2 2]
end
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ include("test_utils.jl")

# @testset "MLUtils.jl" begin


@testset "batch" begin; include("batch.jl"); end
@testset "batchview" begin; include("batchview.jl"); end
@testset "dataloader" begin; include("dataloader.jl"); end
@testset "folds" begin; include("folds.jl"); end
Expand Down

0 comments on commit 146f600

Please sign in to comment.