R6 class representing an RNN.
R6 class representing an RNN.
modello::module -> module.RNN
new()Initialisation method
module.RNN$new(tx, nh, nx, acth, ny, acty, par.h = FALSE)
txtransposition flag. If > 0 op(x) = t(x)
nhinteger vector of length equal to the hidden layes indicating the number of hidden units for each layer
nxinteger, number if inputs
acthactivation function for the recurrent units
nyinteger, number of outputs of the last fully connected layer
actyactivation function for the last fully connected layer
par.hlogical, true => the initial hidden state is treated as a paramter of the optimisation
save()Save the module to an RDS file
module.RNN$save(of, ...)
ofoutput file name or path
...additional arguments to be passed to the function base::saveRDS
op()Runs the calculation stored in the module
module.RNN$op(X)
X'number', module inputs
pars()Returns a list with the model parameters
module.RNN$pars()
rus()Returns a list with the recurrent units
module.RNN$rus()
H()Returns the initial hidden state
module.RNN$H()
fc()Returns the final fully connected layer
module.RNN$fc()
clone()The objects of this class are cloneable with this method.
module.RNN$clone(deep = FALSE)
deepWhether to make a deep clone.