@@ -29,7 +29,8 @@ features, and install trained readout weights.
2929- `(y, st′)` where `y` is the readout output and `st′` contains the updated
3030 states of the reservoir, modifiers, and readout.
3131"""
32- @concrete struct ReservoirComputer <: AbstractReservoirComputer{(:reservoir, :states_modifiers, :readout)}
32+ @concrete struct ReservoirComputer < :
33+ AbstractReservoirComputer{(:reservoir , :states_modifiers , :readout )}
3334 reservoir:: Any
3435 states_modifiers:: Any
3536 readout:: Any
@@ -72,7 +73,8 @@ function (rc::AbstractReservoirComputer)(inp, ps, st)
7273 return out, merge (new_st, (readout = st_ro,))
7374end
7475
75- function collectstates (rc:: AbstractReservoirComputer , data:: AbstractMatrix , ps, st:: NamedTuple )
76+ function collectstates (
77+ rc:: AbstractReservoirComputer , data:: AbstractMatrix , ps, st:: NamedTuple )
7678 newst = st
7779 collected = Any[]
7880 for inp in eachcol (data)
@@ -130,7 +132,8 @@ function is provided, it is called to create a new initial hidden state.
130132 Same as above, but also returns the unchanged `ps` for convenience.
131133
132134"""
133- function resetcarry! (rng:: AbstractRNG , rc:: AbstractReservoirComputer , st; init_carry = nothing )
135+ function resetcarry! (
136+ rng:: AbstractRNG , rc:: AbstractReservoirComputer , st; init_carry = nothing )
134137 carry = get (st. reservoir, :carry , nothing )
135138 if carry === nothing
136139 outd = rc. reservoir. cell. out_dims
0 commit comments