From f3d0c21952e1d1eac6b205ac43de6ec8d13e79ad Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Fri, 24 Feb 2017 15:48:52 +0000 Subject: [PATCH] quote was the right thing here --- src/compiler/code.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/code.jl b/src/compiler/code.jl index 9395e5b9..ab52e8e4 100644 --- a/src/compiler/code.jl +++ b/src/compiler/code.jl @@ -1,5 +1,4 @@ import DataFlow: mapconst, cse -import MacroTools: @q export @net, @ml @@ -69,7 +68,7 @@ function process_type(ex) args, body = process_func(funcs[1], pnames) @assert length(args) == 1 self = esc(:self) - @q begin + quote $(build_type(T, params)) $(esc(:(Flux.runmodel(self::$T, $(args...)) = $(build_forward(body, args))))) ($self::$(esc(T)))($(map(arg -> :($arg::Batch), args)...)) = rebatch(runmodel($self, $(map(x->:(rawbatch($x)), args)...)))