From b92252cd5c61229e8f7a2fc0c09a510b855dfd23 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Mon, 20 Feb 2017 21:49:47 +0000 Subject: [PATCH] more interp catches --- src/backend/mxnet/graph.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/mxnet/graph.jl b/src/backend/mxnet/graph.jl index 84658a34..5b14e0d6 100644 --- a/src/backend/mxnet/graph.jl +++ b/src/backend/mxnet/graph.jl @@ -74,8 +74,10 @@ function graph(ctx::Context, model, args...) interpret(ctx, g, args...) end +graph′(ctx::Context, args...) = @ithrow ctx graph(ctx, args...) + function tograph(model, args...) - ctx = Context(mux(iline, ilambda, imap, iargs, ituple, graph), + ctx = Context(mux(iline, ilambda, imap, iargs, ituple, graph′), params = Dict(), stacks = Dict()) out = @icatch graph(ctx, model, args...) return ctx[:params], ctx[:stacks], out