Skip to content

Commit

Permalink
unrelated, fix tests for 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Dec 2, 2021
1 parent 9e6a657 commit f60671a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ using CUDA

Random.seed!(0)

@testset "all" begin # Overall testset ensures it keeps running after failure

@testset "Utils" begin
include("utils.jl")
end

@testset "Onehot" begin
include("onehot.jl")
@info "Onehot done"
end

@testset "Optimise" begin
Expand All @@ -28,6 +31,7 @@ end
include("losses.jl")
include("ctc.jl")
CUDA.functional() && include("ctc-gpu.jl")
@info "Losses done"
end

@testset "Layers" begin
Expand All @@ -38,6 +42,7 @@ end
include("layers/conv.jl")
include("layers/upsample.jl")
include("layers/show.jl")
@info "Layers done"
end

@testset "outputsize" begin
Expand All @@ -60,3 +65,5 @@ end
doctest(Flux)
end
end

end
2 changes: 1 addition & 1 deletion test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ end
∇m = gradient(m -> sum(m(x)), m)[1]
p, re = destructure(m)
∇p = gradient-> sum(re(θ)(x)), p)[1]
@test ∇p destructure(∇m)[1]
@test ∇p destructure(∇m)[1] atol=1e-4 # for Julia 1.7
end
end
end
Expand Down

0 comments on commit f60671a

Please sign in to comment.