Flux.jl/test/runtests.jl

47 lines
803 B
Julia
Raw Normal View History

using Flux
using Flux.Data
using Test
using Random, Statistics, LinearAlgebra
using IterTools: ncycle
2016-12-15 23:11:35 +00:00
2018-08-11 09:51:07 +00:00
Random.seed!(0)
2018-02-08 10:33:51 +00:00
2020-04-29 08:18:16 +00:00
@testset "Utils" begin
include("utils.jl")
end
@testset "Onehot" begin
include("onehot.jl")
end
@testset "Optimise" begin
include("optimise.jl")
end
@testset "Data" begin
include("data.jl")
end
@testset "Layers" begin
include("layers/basic.jl")
include("layers/normalisation.jl")
include("layers/stateless.jl")
include("layers/conv.jl")
end
@testset "CUDA" begin
if Flux.use_cuda[]
include("cuda/cuda.jl")
else
@warn "CUDA unavailable, not testing GPU support"
end
2020-04-29 08:18:16 +00:00
end
2020-04-29 08:18:16 +00:00
@static if VERSION >= v"1.4"
using Documenter
@testset "Docs" begin
2020-04-29 08:18:16 +00:00
DocMeta.setdocmeta!(Flux, :DocTestSetup, :(using Flux); recursive=true)
doctest(Flux)
end
2020-04-29 08:18:16 +00:00
end