Skip to content
Advertisement

Tag: lstm

How to increase the number of decimals when predicting an attribute using LSTM on Python?

I have an LSTM model on Python (Keras) in which predicts floats with long decimals. However, the predicted value has fewer decimals than expected. For instance: Input value: 41.39011366661221 Predicted value: 41.396626 Should I use something on my model? I’ve also tried to normalize the input. Unfortunately, I get the same number of output decimals. Any clue? Answer Your input

How to hypertune input shape using keras tuner?

I am trying to hypertune the input shape of an LSTM model based on the different values of timesteps. However, I am facing an issue. While initializing the model, the default value of timesteps (which is 2) is chosen, and accordingly, the build_model.scaled_train is created of shape (4096, 2, 64). Thus the value of input_shape during initialization is (2, 64).

Word2Vec + LSTM Good Training and Validation but Poor on Test

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

What does Tensor[batch_mask, …] do?

I saw this line of code in an implementation of BiLSTM: I assume this is some kind of “masking” operation, but found little information on Google about the meaning of …. Please help:). Original Code: Answer I assume that batch_mask is a boolean tensor. In that case, batch_output[batch_mask] performs a boolean indexing that selects the elements corresponding to True in

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 =

Advertisement