Fix tests
This commit is contained in:
parent
7d06f654f0
commit
dd2fa77681
|
@ -14,7 +14,7 @@ using Flux.Tracker: TrackedArray, data
|
|||
|
||||
@test cpu(data(cy)) ≈ data(y)
|
||||
|
||||
g = rand(size(y))
|
||||
g = rand(size(y)...)
|
||||
Flux.back!(y, g)
|
||||
Flux.back!(cy, gpu(g))
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ end
|
|||
@test !m.active
|
||||
|
||||
x′ = m(x).data
|
||||
@test x′[1] ≈ (1 .- 0.3) / 1.1449489742783179
|
||||
@test x′[1] ≈ (1 .- 0.3) / sqrt(1.3)
|
||||
end
|
||||
|
||||
# with activation function
|
||||
|
|
|
@ -25,20 +25,20 @@ insert!(LOAD_PATH, 2, "@v#.#")
|
|||
|
||||
@info "Testing Basics"
|
||||
|
||||
# include("utils.jl")
|
||||
# include("onehot.jl")
|
||||
# include("optimise.jl")
|
||||
# include("data.jl")
|
||||
include("utils.jl")
|
||||
include("onehot.jl")
|
||||
include("optimise.jl")
|
||||
include("data.jl")
|
||||
|
||||
@info "Testing Layers"
|
||||
|
||||
include("layers/normalisation.jl")
|
||||
# include("layers/stateless.jl")
|
||||
# include("layers/conv.jl")
|
||||
include("layers/stateless.jl")
|
||||
include("layers/conv.jl")
|
||||
|
||||
@info "Running Gradient Checks"
|
||||
|
||||
# include("tracker.jl")
|
||||
include("tracker.jl")
|
||||
|
||||
if Base.find_package("CuArrays") != nothing
|
||||
include("cuda/cuda.jl")
|
||||
|
|
Loading…
Reference in New Issue