I am trying to build a ML model with LSTM. I want to import the ‘LSTM’ layer. However, my code does not lead to correct results. The error forces me to use ‘LSTMV1’ instead. But, I want to use ‘LSTM’.
I tried this, and this did not work.
<code>from tensorflow.python.keras.layers import Dense, LSTM
</code>
<code>from tensorflow.python.keras.layers import Dense, LSTM
</code>
from tensorflow.python.keras.layers import Dense, LSTM
This is the error I am getting,
ImportError: cannot import name ‘LSTM’ from ‘tensorflow.python.keras.layers’