You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@raywang1987 I copied this piece of code (for running nonlinear system simulation) from our previous example (or maybe we did not use this, as the old example was linear), but it seems not working now.
The text was updated successfully, but these errors were encountered:
The Flux document on Flux.Recur was a bit confusing to control people. A simple example provided by the document was using an accumulation function as the cell: accum(h, x) = (h + x, x) rnn = Flux.Recur(accum, 0)
In Flux doc, h is the hidden states, x is the input to the cell.
To use Flux.Recur in control context, one can define a (discrete-time) nonlinear system dynamic as: x, y = f(x, u)
(Note: the order of returned value matters, Flux will take the first as hidden states and second as output)
Then it can be initialized as a Flux model with initial state x0 model = Flux.Recur(f, x0)
Simulate one time step given input u(t): y = model(u(t))
The hidden state (sate of the dynamic system) can be accessed in model.state.
RobustNeuralNetworks.jl/examples/src/lbdn_rl.jl
Line 48 in b7b1bee
@raywang1987 I copied this piece of code (for running nonlinear system simulation) from our previous example (or maybe we did not use this, as the old example was linear), but it seems not working now.
The text was updated successfully, but these errors were encountered: