module.LstmUnit: R6 class representing the recurrent layer of a LSTM network

Description Super class Methods Author(s)

Description

R6 class representing the recurrent layer of a LSTM network

R6 class representing the recurrent layer of a LSTM network

Super class

modello::module -> module.LstmUnit

Methods

Public methods

Inherited methods

Method new()

Initialisation method

Usage
module.LstmUnit$new(tx, nh, nx, act)
Arguments
tx

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

nh

number of input from the previous time steps

nx

number of input form the current time step

act

activation function


Method op()

Performs: input_gate = Wxi . op(x) + Whi . h + Bi forget_gate = Wxf . op(x) + Whf . h + Bf output_gate = Wxo . op(x) + Who . h + Bo current_cell = act(Wxg . op(x) + Whg . h + Bg) cell_sate = forget_gate * cell_previous + input_gate * cell_current hidden_state = output_gate * act(cell_state) Returns a list composed by hidde_state and cell_state

Usage
module.LstmUnit$op(h, g, x)
Arguments
h

past hidden state

g

past cell state

x

current input


Method pars()

Returns a list with the model parameters

Usage
module.LstmUnit$pars()

Method clone()

The objects of this class are cloneable with this method.

Usage
module.LstmUnit$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.