fix model call
This commit is contained in:
parent
1b22d55401
commit
c6fb9c1f0c
@ -47,7 +47,7 @@ TensorFlow.get_tensors(x::Tuple) = TensorFlow.get_tensors(collect(x))
|
|||||||
function (m::SeqModel)(x::BatchSeq)
|
function (m::SeqModel)(x::BatchSeq)
|
||||||
m.m.model.stateful || return batchseq(runmodel(m.m, x)[end])
|
m.m.model.stateful || return batchseq(runmodel(m.m, x)[end])
|
||||||
if isempty(m.state) || length(first(m.state)) ≠ length(x)
|
if isempty(m.state) || length(first(m.state)) ≠ length(x)
|
||||||
m.state = m.m.model.state
|
m.state = batchone.(m.m.model.state)
|
||||||
end
|
end
|
||||||
output = runmodel(m.m, m.state..., x)
|
output = runmodel(m.m, m.state..., x)
|
||||||
m.state, output = output[1:end-1], output[end]
|
m.state, output = output[1:end-1], output[end]
|
||||||
|
Loading…
Reference in New Issue
Block a user