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

CC BY-SA 4.0
2020-03-17T08:57:06.647Z
2020-03-17T08:57:06.647Z
user q
<p>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. </p>

CC BY-SA 4.0
2020-03-17T09:00:34.040Z
2020-03-17T09:00:34.040Z
hola
<p>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] </p>

CC BY-SA 4.0
2020-03-17T10:48:04.377Z
2020-03-17T10:48:04.377Z
razvanc92
<p>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.</p>

<p>Please see the below model architecture</p>

<p><em>Model Architecture</em> </p>

<pre><code>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))
</code></pre>

<p>In this case, using sigmoid as an activation function is it correct? </p>

<long-short-term-memory><activation-functions><regression><forecasting>
Using sigmoid in LSTM network for multi-step forecasting
Majo_Jose
# Using sigmoid in LSTM network for multi-step forecasting

(Asked by: username_0 on 2020-03-17)

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?

**Tags:** long-short-term-memory, activation-functions, regression, forecasting


---

## 3 answers

### Answer by username_1 on 2020-03-17. Score: 1

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


---

### Answer by username_2 on 2020-03-17. Score: 1

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.


---

### Answer by username_3 on 2020-03-17. Score: 1

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]


---

