fix stateful in backends

This commit is contained in:
Mike J Innes 2017-06-02 16:28:31 +01:00
parent 5232a3300c
commit 10abb64f4b
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ Flux.update!(m::Model, η) = (update!(m.last, η); m)
using Flux: Stateful, SeqModel
mxnet(m::Stateful) = Stateful(mxnet(m.model), m.istate, m.ostate)
mxnet(m::Stateful) = Stateful(mxnet(m.model), m.states, m.istate, m.ostate)
mxnet(m::SeqModel) = SeqModel(mxnet(m.model), m.steps)
# MX FeedForward interface

View File

@ -77,5 +77,5 @@ Flux.update!(m::Model, η) = (update!(m.exec, η); m)
using Flux: Stateful, SeqModel
tf(m::Stateful) = Stateful(tf(m.model), m.istate, m.ostate)
tf(m::Stateful) = Stateful(tf(m.model), m.states, m.istate, m.ostate)
tf(m::SeqModel) = SeqModel(tf(m.model), m.steps)