module.LSTM: R6 class representing an LSTM.

Description Super class Methods Author(s)

Description

R6 class representing an LSTM.

R6 class representing an LSTM.

Super class

modello::module -> module.LSTM

Methods

Public methods

Inherited methods

Method new()

Initialisation method

Usage
module.LSTM$new(tx, nh, nx, acth, ny, acty, par.h = FALSE, par.g = FALSE)
Arguments
tx

transposition flag. If > 0 op(x) = t(x)

nh

integer vector of length equal to the hidden layes indicating the number of hidden units for each layer

nx

integer, number if inputs

acth

activation function for the recurrent units

ny

integer, number of outputs of the last fully connected layer

acty

activation function for the last fully connected layer

par.h

logical, true => the initial hidden state is treated as a paramter of the optimisation

par.g

logical, true => the initial cell state is treated as a paramter of the optimisation


Method save()

Save the module to an RDS file

Usage
module.LSTM$save(of, ...)
Arguments
of

output file name or path

...

additional arguments to be passed to the function base::saveRDS


Method op()

Runs the calculation stored in the module

Usage
module.LSTM$op(X)
Arguments
X

'number', module inputs


Method pars()

Returns a list with the model parameters

Usage
module.LSTM$pars()

Method rus()

Returns a list with the recurrent units

Usage
module.LSTM$rus()

Method H()

Returns the initial hidden state

Usage
module.LSTM$H()

Method fc()

Returns the final fully connected layer

Usage
module.LSTM$fc()

Method clone()

The objects of this class are cloneable with this method.

Usage
module.LSTM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Filippo Monari


modello documentation built on Feb. 2, 2021, 9:06 a.m.

Related to module.LSTM in modello...