this was wrong

This commit is contained in:
Mike J Innes 2017-03-03 14:06:51 +00:00
parent 1d45cdc301
commit a03898d24d
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ end
graph{T<:AArray}(ctx::Context, p::Constant{Flux.Param{T}}) = var(ctx, p.value) graph{T<:AArray}(ctx::Context, p::Constant{Flux.Param{T}}) = var(ctx, p.value)
graph(ctx::Context, p::Constant) = node(p.value) graph(ctx::Context, p::Constant) = p.value
function graph(ctx::Context, model, args...) function graph(ctx::Context, model, args...)
g = Flux.graph(model) g = Flux.graph(model)

View File

@ -51,7 +51,7 @@ interp{T<:AArray}(ctx, p::Constant{Flux.Param{T}}) =
ctx[:params][p.value] : ctx[:params][p.value] :
(ctx[:params][p.value] = Variable(convertel(Float32, p.value.x))) (ctx[:params][p.value] = Variable(convertel(Float32, p.value.x)))
interp(ctx, p::Constant) = node(p.value) interp(ctx, p::Constant) = p.value
function interp(ctx, model, args...) function interp(ctx, model, args...)
g = Flux.graph(model) g = Flux.graph(model)