From 3b3a088851b19872bbcd223a60c4c4922298af99 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Fri, 27 Jan 2017 17:03:22 +0530 Subject: [PATCH] more correct --- src/backend/tensorflow/graph.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/tensorflow/graph.jl b/src/backend/tensorflow/graph.jl index 0218ceaa..e55df339 100644 --- a/src/backend/tensorflow/graph.jl +++ b/src/backend/tensorflow/graph.jl @@ -20,10 +20,10 @@ graph(::typeof(hcat), xs...) = concat(1, xs) graph(::typeof(seq), xs, n) = TensorFlow.unpack(xs, num = n, axis = 1) for op in (tanh, *, .*, +, -) - @eval graph(::typeof($op), args...) = $op(node(args)...) + @eval graph(::typeof($op), args...) = $op(args...) end -graph(::typeof(.-), args...) = -(node(args)...) +graph(::typeof(.-), args...) = -(args...) # reshape hack due to https://github.com/malmaud/TensorFlow.jl/issues/79 batchsize(x::Tensor) = reduce_sum(slice(TensorFlow.shape(x), [0], [1])) @@ -51,7 +51,7 @@ interp{T<:AArray}(ctx, p::Constant{Flux.Param{T}}) = ctx[:params][p.value] : (ctx[:params][p.value] = Variable(convertel(Float32, p.value.x))) -interp(ctx, p::Constant) = p.value +interp(ctx, p::Constant) = node(p.value) function interp(ctx, model, args...) g = Flux.graph(model)