So I want to build an autoencoder model for sequence data. I have started to build a sequential keras model in python and now I want to add an attention layer in the middle, but have no idea how to approach this. My model so far: So far I have tried to add an attention function copied from here and
Tag: lstm
num_units in GRU and LSTM layers in keras Tensorflow 2 – confuse meaning
I know that this question raised many time, but I could not get a clear answer because there are different answers: In tf.keras.layers.LSTM tf.keras.layers.GRU layers there is a parameter called num_units. I saw a lot of questions over the internet about this parameter. and there is not clear answer for what this parameter mean expect for the obvious meaning which
Specifying number of cells in LSTM layer in PyTorch
I don’t fully understand the LSTM layer in PyTorch. When I instantiate an LSTM layer how can I specify the number of LSTM cells inside the layer? My first thought was that it was the “num_layers” argument, if we assume that LSTM cells are connected vertically. But if that is the case how can we implement stacked LSTM with for
Implementing a minimal LSTMCell in Keras using RNN and Layer classes
I am trying to implement a simple LSTMCell without the “fancy kwargs” defaultly implemented in the tf.keras.layers.LSTMCell class, following a schematic model like this. It doesn’t really have a direct purpose, I would just like to practice implementing a more complex RNNCell than the one described here in the Examples section. My code is the following: However, when I tried
keras lstm error: expected to see 1 array
so i want to make a lstm network to run on my data but i get this message: ValueError: Error when checking input: expected lstm_1_input to have shape (None, 1) but got array with shape (1, 557) this is my code: Answer You need to change the input_shape value for LSTM layer. Also, x_train must have the following shape. So,
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow)
I want to install tensorflow to use Keras LSTM I installed Keras, and i import this lines to my code. Error is when runnig the code: Cmd error when i write “pip install tensorflow” : Pip version is 19.3 , python version 3.7 Answer On Windows, you must use Python 3.7.6 (64 bits) (or later version, provided it is 64-bits)
Keras LSTM – why different results with “same” model & same weights?
(NOTE: Properly fixing the RNG state before each model creating as described in comment in comment practically fixed my problem, as within 3 decimals results are consistent, but they aren’t exactly so, so there’s somewhere a hidden source of randomness not fixed by seeding the RNG… probably some lib uses time milisecs or smth…if anyone has an idea on that,