make this immutable again
This commit is contained in:
parent
2082d9db5c
commit
7e983c74cb
@ -127,7 +127,7 @@ graph(cap::Capacitor) = cap.graph
|
|||||||
|
|
||||||
# Recurrent Models
|
# Recurrent Models
|
||||||
|
|
||||||
mutable struct Stateful <: Model
|
struct Stateful <: Model
|
||||||
model
|
model
|
||||||
state::Vector{Any}
|
state::Vector{Any}
|
||||||
end
|
end
|
||||||
@ -135,7 +135,7 @@ end
|
|||||||
function (m::Stateful)(x)
|
function (m::Stateful)(x)
|
||||||
runrawbatched(x) do x
|
runrawbatched(x) do x
|
||||||
state, y = runmodel(m.model, (m.state...,), x)
|
state, y = runmodel(m.model, (m.state...,), x)
|
||||||
m.state = collect(state)
|
m.state .= state
|
||||||
return y
|
return y
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user