move test utils
This commit is contained in:
parent
4113d4d476
commit
298c6f252e
@ -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
|
@testset "Basics" begin
|
||||||
|
|
||||||
xs = randn(10)
|
xs = randn(10)
|
||||||
|
@ -13,6 +13,24 @@ macro tfonly(ex)
|
|||||||
:(Base.find_in_path("TensorFlow") ≠ nothing && $(esc(ex)))
|
:(Base.find_in_path("TensorFlow") ≠ nothing && $(esc(ex)))
|
||||||
end
|
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("batching.jl")
|
||||||
include("basic.jl")
|
include("basic.jl")
|
||||||
include("recurrent.jl")
|
include("recurrent.jl")
|
||||||
|
Loading…
Reference in New Issue
Block a user