December 2018
Beginner to intermediate
684 pages
21h 9m
English
We use a similar architecture with two stacked LSTM layers with 12 and 6 units, respectively, followed by a fully-connected layer with 10 units. The output layer has two units, one for each time series. We compile them using mean absolute loss and the recommended RMSProp optimizer, as follows:
n_features = output_size = 2lstm1_units = 12lstm2_units = 6rnn = Sequential([ LSTM(units=lstm1_units, dropout=.2, recurrent_dropout=.2, input_shape=(window_size, n_features), name='LSTM1', return_sequences=True), LSTM(units=lstm2_units, dropout=.2, recurrent_dropout=.2, name='LSTM2'), Dense(10, name='FC1'), Dense(output_size, name='Output')])rnn.compile(loss='mae', optimizer='RMSProp')
The model has 1,268 parameters, ...