2
$\begingroup$

I'm trying to develop a multistep forecasting model using LSTM Network. The model takes three times steps as input and predicting two time_steps. both input and output columns are normalised using minmax_scalar within the range of 0 and 1.

Please see the below model architecture

Model Architecture

model = Sequential()
model.add(LSTM(80,input_shape=(3,1),activation='sigmoid',return_sequences=True))
model.add(LSTM(20,activation='sigmoid',return_sequences=False))
model.add(Dense(2))

In this case, using sigmoid as an activation function is it correct?

$\endgroup$

3 Answers 3

1
$\begingroup$

Yes, due the input, output being constrained between zero and one that would be the only viable activation function.

$\endgroup$
1
$\begingroup$

You have a problem in your code, you want to use "sigmoid" in the last layer. Fot the code you are showin you are using linear activation in the last layer.

$\endgroup$
1
$\begingroup$

You should not limit yourself to sigmoid as activation function on the last layer. Usually you're normalizing your dataset, but when you're testing/evaluating the model you're applying the inverse of the scaling transformation to the predictions, so you could easily use tanh which is defined on [-1, 1]

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .