brief interpreter errors test

This commit is contained in:
Mike J Innes 2017-02-21 16:34:15 +00:00
parent 5f355d96ad
commit 8e726167dc

View File

@ -23,3 +23,13 @@ let a1 = Affine(10, 20), a2 = Affine(20, 15)
@test tlp(xs) softmax(a2(σ(a1(xs)))) @test tlp(xs) softmax(a2(σ(a1(xs))))
@test Flux.infer(tlp, (1, 10)) == (1,15) @test Flux.infer(tlp, (1, 10)) == (1,15)
end end
let tlp = TLP(Affine(10, 21), Affine(20, 15))
e = try
tlp(rand(10))
catch e
e
end
@test e.trace[end].func == :TLP
@test e.trace[end-1].func == Symbol("Flux.Affine")
end