fix exec forward pass

This commit is contained in:
Mike J Innes 2017-03-30 19:25:54 +01:00
parent 4df97bf607
commit 4de61fc377

View File

@ -69,8 +69,8 @@ function executor(graph::Graph, input...)
return exec return exec
end end
function (exec::Exec)(input) function (exec::Exec)(input...)
copy!(exec.args[exec.graph.input[1]], input) foreach(kv -> copy!(exec.args[kv[1]], kv[2]), dictt(exec.graph.input, input))
mx.forward(exec.exec, is_train = true) mx.forward(exec.exec, is_train = true)
mxungroup(exec.graph.output, copy(exec.outs)) mxungroup(exec.graph.output, copy(exec.outs))
end end