0
$\begingroup$

Here's a description of a model I'd like to get:

A vanilla LSTM model with similar size as our model. Specifically, a two-layer sacked LSTM is constructed, with 128 and 32 hidden states, respectively, followed by a fully connected layer for the final output. This neural network also takes 28 days as input, and predicts the next day.

# design network
model = Sequential()
model.add(LSTM(128, input_shape=train_X.shape)) % 28 days
model.add(LSTM(32, input_shape=128)) % 128 units for previous layer
model.add(Dense(1))
$\endgroup$

1 Answer 1

1
$\begingroup$

This looks okay as long as the input shape is correct. input_shape is (number_steps, dimension_features), so in this case it would be (28, dim_feat). If dim_feat is not 1, then you would also need to change the dimension of the output of the Dense layer to be dim_feat.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.