currently I’am training my Word2Vec + LSTM for Twitter sentiment analysis. I use the pre-trained GoogleNewsVectorNegative300 word embedding. The reason I used the pre-trained GoogleNewsVectorNegative300 because the performance much worse when I trained my own Word2Vec using own dataset. The problem is why my training process had validation acc and loss stuck at 0.88 and 0.34 respectively. Then, my confussion
Tag: lstm
name ‘Bidirectional’ is not defined
Im following this tutorial and right when I want to initialize a sequential keras, like the code below: I get an error saying : What is the problem ? it is the exact same code as in the tutorial. Answer You’re most likely missing the import statement from the tensorflow package. It appears that’s there is a link to the
Fitting LSTM model
I am trying to fit LSTM model, but it gave me an error with the shape. my dataset has 218 rows and 16 features including the targeted one. I split the data, %80 for training and %20 for testing, after compiling the model and run it, i got this error: Variable definitions: batch_size = 160 epochs = 20 timesteps =
Lstm for multivariate sequence prediction
I am confused with my Stacked LSTM model. Lstm has different type of applications. For example, in the image, two types of LSTM are shown, machine translation and video classification. My model is as …
How to add an attention layer to LSTM autoencoder built as sequential keras model in python?
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 …
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 …
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
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 […]
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. from keras.callbacks import LambdaCallback from keras.models import Sequential from keras.layers …