multi test is redundant
This commit is contained in:
parent
3998be2244
commit
b511160ec4
@ -9,10 +9,6 @@ d = Affine(20, 10)
|
|||||||
dm = mxnet(d)
|
dm = mxnet(d)
|
||||||
@test d(xs) ≈ dm(xs)
|
@test d(xs) ≈ dm(xs)
|
||||||
|
|
||||||
m = Multi(20, 15)
|
|
||||||
mm = mxnet(m)
|
|
||||||
@test all(isapprox.(mm(xs, ys), m(xs, ys)))
|
|
||||||
|
|
||||||
@testset "Tuple I/O" begin
|
@testset "Tuple I/O" begin
|
||||||
@test mxnet(@net x -> (x,))([1,2,3]) == ([1,2,3],)
|
@test mxnet(@net x -> (x,))([1,2,3]) == ([1,2,3],)
|
||||||
@test mxnet(@net x -> x[1].*x[2])(([1,2,3],[4,5,6])) == [4,10,18]
|
@test mxnet(@net x -> x[1].*x[2])(([1,2,3],[4,5,6])) == [4,10,18]
|
||||||
|
@ -9,10 +9,6 @@ d = Affine(20, 10)
|
|||||||
dt = tf(d)
|
dt = tf(d)
|
||||||
@test d(xs) ≈ dt(xs)
|
@test d(xs) ≈ dt(xs)
|
||||||
|
|
||||||
m = Multi(20, 15)
|
|
||||||
mm = tf(m)
|
|
||||||
@test all(isapprox.(mm(xs, ys), m(xs, ys)))
|
|
||||||
|
|
||||||
@testset "Tuple I/O" begin
|
@testset "Tuple I/O" begin
|
||||||
@test tf(@net x -> (identity(x),))([1,2,3]) == ([1,2,3],)
|
@test tf(@net x -> (identity(x),))([1,2,3]) == ([1,2,3],)
|
||||||
@test tf(@net x -> x[1].*x[2])(([1,2,3],[4,5,6])) == [4,10,18]
|
@test tf(@net x -> x[1].*x[2])(([1,2,3],[4,5,6])) == [4,10,18]
|
||||||
|
@ -32,10 +32,4 @@ let tlp = TLP(Affine(10, 21), Affine(20, 15))
|
|||||||
@test e.trace[end-1].func == Symbol("Flux.Affine")
|
@test e.trace[end-1].func == Symbol("Flux.Affine")
|
||||||
end
|
end
|
||||||
|
|
||||||
let m = Multi(10, 15)
|
|
||||||
x, y = rand(1, 10), rand(1, 10)
|
|
||||||
@test all(isapprox.(m(x, y), (x * m.W.x, y * m.V.x)))
|
|
||||||
@test all(isapprox.(m(x, y), Flux.interpmodel(m, x, y)))
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -22,15 +22,6 @@ end
|
|||||||
end
|
end
|
||||||
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