move test utils

This commit is contained in:
Mike J Innes 2017-03-30 19:50:43 +01:00
parent 4113d4d476
commit 298c6f252e
2 changed files with 18 additions and 18 deletions

View File

@ -1,21 +1,3 @@
@net type TLP
first
second
function (x)
l1 = σ(first(x))
l2 = softmax(second(l1))
end
end
@net type Multi
W
V
(x, y) -> (x*W, y*V)
end
Multi(in::Integer, out::Integer) =
Multi(randn(in, out), randn(in, out))
@testset "Basics" begin
xs = randn(10)

View File

@ -13,6 +13,24 @@ macro tfonly(ex)
:(Base.find_in_path("TensorFlow") nothing && $(esc(ex)))
end
@net type TLP
first
second
function (x)
l1 = σ(first(x))
l2 = softmax(second(l1))
end
end
@net type Multi
W
V
(x, y) -> (x*W, y*V)
end
Multi(in::Integer, out::Integer) =
Multi(randn(in, out), randn(in, out))
include("batching.jl")
include("basic.jl")
include("recurrent.jl")