Category "lstm"

ValueError: Input 0 of layer lstm_14 is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: [None, 12, 12, 64]

I am using CNN-LSTM network for image classification. My image size is (224, 224, 3) and batch size is 90. I m getting this error when i passing input to LSTM l

Preparing input data for LSTM layer with conditions

I have a data frame that looks like the one below: DF.head(20): time var1 var2 prob 12:30 10 12 85 12:31 15

Speed up ndarray process of RNN model using Google Colab

I'm working on a RNN model to recognize speech keywords. I found out that the code below need to run at least 5 minutes in google colab. Is there any way of cod

ValueError: Input 0 of layer "sequential_35" is incompatible with the layer: expected shape=(None, 800, 1, 100), found shape=(None, 1, 100)

Hi Im currently working on the below program but im getting below error: ValueError: Input 0 of layer "sequential_35" is incompatible with the layer: expected s

Difference equation in LSTM network on Tensorflow

I'd like to use a LSTM network on Tensorflow to implement a difference equation. I searched on internet but I didn't find anything about this topic. The equatio

How to input a history of vectors to LSTM based network instead of a single vector?

I am trying to predict a simple pattern using LSTM based network. I input a single vector and get the output vector with the same shape as a prediction. How can

I'd like to change the Keras to a pytorch, but I don't know how to build a neural network

The HAR dataset should be analyzed using LSTM and 1D CNN. I need to check the graph of the change in loss and check the confusion matrix. I don't know how to ma

Replace bidirectional LSTM with GRU in coref?

I am training the coarse-to-fine coreference model (for some other language than English) from Allennlp with template configs from bert_lstm.jsonnet. When I rep

Work around Keras TypeError limitation when calling layer "tf.keras.backend.rnn_1"

I am trying to use Keras for an attention mechanism in a machine translation using an LSTM network. However, I get a TypeError exception when in my code. TypeEr

Dimension issues for LSTM sequence model on Keras

I'd like to train a simple LSTM model for sequence data with 128 time steps with 6 features for 118 multi-classes. The dimensions of the dataset are shown belo

How can I predict n number of future values using RNN which uses multiple features

I am having a use case where I need to predict n number of future values after using the given data. eg: I have data from Jan 1 2021 - Jan 1 2022. I need to pre

What is the from repeating same layers in AI architecture

I know that in ai models lstm is used to extract features from data and dropout is used to focus in the main ones, but i can't understand why people used to rep

Warning when fitting the LSTM model

When I try to fit my model i get an error. Here is the code: model = Sequential() model.add(LSTM(128, activation='relu', input_shape=(trainX.shape[1], trainX.sh

How to handel Imbalance data while using LSTM

I am doing a project on an online signature verification system using RNNs LSTM. In the project, I am facing a problem while using the signatures as LSTM trai

How to perform Recursive Feature Elimination (RFE) with LSTM as estimator in python?

I am trying to identify the important features in a data frame containing stock data. I plan on using LSTM to predict closing prices later on. I currently have

How to setup LSTM to use n-grams instead of sequence length?

I currently have an LSTM which uses sequence length as input, but this only allows the LSTM to predict when the input length is equal to the used sequence lengt

Training simple CNN-LSTM model

I have a task for my project paper and I do not get how to train the model. This model is supposed to take an image and segment it into different classes. The h

model.fit in a for loop, for K-fold cross validation

I am trying to code a K-fold cross validation with LSTM architecture. But I got an this error (edit): Traceback (most recent call last): File "/Users/me/Deskt

Tensorflow error: ValueError: Shapes (128, 100) and (128, 100, 139) are incompatible

I try to use Functional API for my model, but i don't understand why i have error: ValueError: Shapes (128, 100) and (128, 100, 139) are incompatible My code:

LSTM model fails

enter image description here model = Sequential() model.add(LSTM(units=32, return_sequences=True, input_shape=(training.shape[1],1))) model.add(Dropout(0.2)) mo