Questions tagged [lstm]

LSTM stands for Long Short-Term Memory. When we use this term most of the time we refer to a recurrent neural network or a block (part) of a bigger network.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Is this GRU learning good?

Result seems to be a little out of "expected" values. It's timeseries dataset.
  • 101
0 votes
0 answers
9 views

Can not validate LSTM/GRU if return_sequences=True

As I understand the last LSTM before output layer should be set to model.add(LSTM(lstmUnits, return_sequences=False)) but in such a case I can not validate while ...
  • 101
0 votes
0 answers
15 views

Custom loss function in keras with class weights for each batch

I am new to deep learning and tensorflow. I am working on a speech binary classification problem, trying to replicate a research paper. Number of samples in class 1 are 2700 approx and in class 2 are ...
  • 1
0 votes
0 answers
15 views

Can I use Deep Learning Algorithm between every two columns of excel with text data?

If my data has this format Now can I use LSTM in between each column? I have to classify keyword into column B first and then Column A. are there any other ways I can look into? But I had larger data ...
0 votes
0 answers
18 views

How can I reduce the RMSE in my LSTM time series prediction model?

I am currently working on a time series prediction problem using an LSTM model and I am facing an issue of high root mean squared error (RMSE). I would like to reduce the RMSE and improve the accuracy ...
0 votes
0 answers
6 views

Text Classification Model unable to learn

I am trying to build a text classification model. When I train the model it is unable to improve accuracy and at some point accuracy even decreases and loss increases. I have researched for possible ...
0 votes
1 answer
14 views

Is there such a thing as RNN-LSTM

From the title, I wanna know if there's such a thing as RNN-LSTM. I know that they are their own thing but I've yet to know if there's such a "combination". For context, I was reading a ...
0 votes
1 answer
12 views

How RNN or LSTM delays the input

RNN or LSTM are known to hold the previous timestamp data as "memory" so that short or long range dependencies can be remembered. But in the following simple keras model, where is that delay ...
0 votes
1 answer
14 views

Why are the hidden states of an RNN initialised every epoch instead of every batch?

Why are the hidden states of RNNs/LSTMs/GRUs generally re-initialised only once an epoch has finished, not once a batch has finished?
0 votes
0 answers
7 views

Shaping Data for time series ConvLSTM

I am having the same problem and I am unable to properly fit the input to the model. Can u please share some of your code snippets. mainly for input data reshaping and passing into the ConvLSTM2d. ...
  • 1
0 votes
2 answers
27 views

LSTMs how to forecast out N steps

I have about 3 weeks of 15 minute building electricity power data and curious to know how can I predict an entire days worth of electricity into the future? 96 Future values that makes up 24 hours......
  • 371
1 vote
0 answers
52 views

How can I make my neural network learn faster?

I would like to train an LSTM-based variational autoencoder on a large dataset (37 million sentences). However, I have calculated that my training speed as of now is too slow (on Google Colab). I am ...
0 votes
0 answers
9 views

LSTM input_shape returns value error

My time series dataset dimension are as follows: print(X_train.shape) = (1766, 4) i.e. 1,766 time steps and 4 features ...
0 votes
0 answers
6 views

Help with transitioning an existing DQN into a DRQN

Hi Data Science Stack Exchange community, To preface this post, please let me know if I need to clarify any details to receive help and/or guidance. I am new to posting on Data Science Stack Exchange ...
  • 1
0 votes
0 answers
18 views

How do I implement recurrent activations for LSTM/GRU cells in Pytorch?

Although Tensorflow has simple parameters with which I can initialize the recurrent activation of a GRU or LSTM cell, Pytorch does not. Could someone provide me the best way to add recurrent ...
0 votes
0 answers
7 views

LSTM data reshaping

I have a dataset composed by three measurements of 12 different people of 22 minutes each, so I should threat it as a timeseries. The dataset should look like this: ...
  • 1
0 votes
0 answers
11 views

Embedding: Can i use it in a time series problem?

I'm trying to do feature extraction in some discretized time series with a variable length, doing that i'm creating an RNN auto encoder. My main problem is to find a way to let the model train with ...
1 vote
1 answer
26 views

Using the whole GloVe pre-trained embedding matrix or minimize the matrix based on the number of words in vocabulary

I have created a neural network for sentiment analysis using bidirectional LSTM layers and pre-trained GloVe embeddings. During the training I noticed that the ...
  • 111
2 votes
0 answers
45 views

TF: What is the difference between the 'kernel weights' and the 'recurrent kernel weights' in LSTMs/GRUs?

Context: I am trying to understand the differences between the GRU/LSTM cells from tensorflow and pytorch (for research reproducibility) and noticed that TensorFlow differentiates between the ...
3 votes
3 answers
533 views

Could you explain if this plot is good or bad. It is a sentiment analysis modelusing LSTM layers

Could you explain if this plot is good or bad. It is a sentiment analysis modelusing LSTM layers.20% of the data used for validation, and the remaining 80% for training.
1 vote
1 answer
32 views

Are there any practical advantages of LSTMs over transformers?

There are a number of articles noting that transformers have significant advantages over "traditional" RNNs like LSTMs. And the industry as a whole have been moving away from LSTMs. My ...
1 vote
0 answers
12 views

How can I test a model on longer sequences that it is trained on

I am trying to train a model on ECGs. Unfortunately, I do not have enough data for 30s ecgs but I have sufficient data for 10s ecgs. I have trained a CNN model and performs really well on the 10s data....
  • 11
0 votes
0 answers
13 views

How do I prepare data for a multivariate LSTM model that includes multiple patients

I want to predict the blood glucose levels using time series data with multiple features such as time, glucose levels, carbohydrates, fat, and protein. I have a dataset with hundreds of patients but ...
  • 1
0 votes
0 answers
16 views

Use Beam Search in encoder-decoder

How can tfa.seq2seq.BeamSearchDecoder, for example, be used with a simple encoder-decoder architecture? Suppose the task is machine translation, where the encoder returns a vector representation of ...
0 votes
1 answer
31 views

LSTM model is producing really bad results for multiclass text classification for imbalanced small dataset

I am training a LSTM model on my current dataset to predict the multiclass categories - there are 18 mutually exclusive categories and the dataset has ...
0 votes
0 answers
13 views

Keras LSTM's: why do I get the best results with just 1 timestep input data?

I've created a stacked LSTM model to predict the price of Bitcoin for each next timestep ( day ) based on the historic values; say, the values of the last n ...
0 votes
0 answers
17 views

Time series deep learning

I have to make a model to predict next best channel so that the profit of brand can be maximize.I have been given data of 10k health care of 1 year and their profit and channel of mode used. There are ...
1 vote
2 answers
144 views

How to arrange multiple multivariate time series of different length before passing it to Keras LSTM layer

I have a number of multivariate time series that are produced by the same kind of process but: are of significantly different lengths; each time series is an independent instance, and the ...
  • 172
0 votes
1 answer
31 views

Keras: LSTM model training - great differences in training results

This is an issue I've been encountering before and I was wondering what can be potential causes for this. Occasionally, training of an identical setup LSTM model ( using Keras ), on the same training ...
0 votes
0 answers
7 views

What does it mean to "condition' a net's output?

Graves talks about conditioning the predictions of a net based on inputs. What does that mean, and how is it done?
0 votes
1 answer
11 views

Number of cells in a keras LSTM is not equal to the number of time steps

I am trying to understand sequenctial model of LSTM. In this example: https://its-ml.de/index.php/plattscaling/, the number of time steps is 50. However, the number of cells in LSTM layer-1 is 100. ...
0 votes
0 answers
11 views

Unstable loss in binary classification for time-series data - extremely imbalanced dataset

I am working on deep learning model to detect regions of timesteps with anomalies. This model should classify each timestep as possessing the anomaly or not. My labels are something like this: ...
  • 73
0 votes
0 answers
34 views

LSTM with multiple entries per month

I'm trying to solve a problem that has this structure: Date ID feature1 feature2 Y Month1 1 1 2 1 Month2 1 3 4 0 Month3 1 5 6 1 Month1 2 7 8 1 Month2 2 9 10 0 Month3 2 11 12 1 I need to ...
  • 1
0 votes
0 answers
13 views

bad prediction when having noise on the data: LSTM time-series regression

I want to predict the force plate using a smart insole using the LSTM model for time series prediction. the data on the force plate has positive and negative values (I think the resulting positive ...
0 votes
0 answers
9 views

How to create test data for multi input model without label with tf.data api

I am having problem creating test data with tf.data api for a model that takes 2 inputs. model ...
0 votes
1 answer
38 views

Error using sigmoid activation function in the last dense layer of a LSTN

Trying to use sigmoid as an activation function for the last dense layer of a LSTN, I get this error ...
0 votes
0 answers
20 views

Batch normalization for time series data

Could you please explain if and how to apply batch normalization on time series data? Does it differ (if so, how) from the batch normalization in images, for example. While it is not formally correct ...
0 votes
0 answers
52 views

How to use MinMaxScaler when X_train and X_test are different sizes

I'm using an LSTM through Keras to predict a time series. My inputs are the previous measurements of one time series(v1) at time 0-59 seconds and the goal is to predict the measurement of a different ...
0 votes
0 answers
12 views

Reshaping the target variable for LSTM in Keras

Consider that we have the stock prices of a certain company collected daily for 5 years. Now, we need to build an lstm to predict the stock price for future days. Consider that we take a timestep of ...
1 vote
0 answers
51 views

Dropout and LSTM layers

Consider the following code: ...
  • 35
0 votes
0 answers
89 views

Input 0 of layer "lstm_6" is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: (None, 7, 7, 512)

...
  • 1
1 vote
0 answers
24 views

Motivation of LSTM with no Input

I have read this paper where authors use LSTM to learn the attention applied to several sets. They use LSTM without input or output, LSTM just uses the hidden state and evolves it: My question is ...
  • 11
0 votes
0 answers
11 views

Why LSTM better than Resnet50 for regression model

I want to simulate a force plate using a smart insole. I compare 2 models, the 2 models I use are LSTM and resnet50. my experimental results show that LSTM has better results than Resnet50. but a ...
  • 1
0 votes
0 answers
26 views

Why are LSTMs not very good in extrapolating time-series?

I was trying to train an LSTM based recurrent-neural-network to extrapolate a simple time-series. The time-series I am using a simple superposition of sinusoidal series of different frequencies. ...
0 votes
0 answers
27 views

Supervided anomaly detection for time series sensor data with LSTM

I have a supervised anomaly detection problem which involves time series sensor data. The structure of data is as follows: I have several industrial machines (say 100). Each machine is equipped with ...
  • 43
0 votes
0 answers
132 views

Warning for input shape in LSTM model

I have timeseries data of electricity consumption per hour with length (17544, 1) in the following format: ...
  • 101
0 votes
0 answers
2k views

Keras Graph Execution Error When fitting the model

I am using this https://keras.io/examples/vision/conv_lstm/ code and providing my own dataset, which consists of frame size 550x775. But When I try to execute the ...
0 votes
0 answers
18 views

how to classify sequence of ball coordinate x,y with LSTM

I am working on a problem where I need to classify the sequence of ball coordinates X and Y with LSTM or another model. I have two classes rally(1) and not rally(0). I want to get as an input model a ...
0 votes
0 answers
14 views

How to represent data for LSTM model?

I have data which consists of stationary variables which remain same across a year such as soil data and time varying variables which change daily such as weather data. I want to build LSTM model ...
0 votes
0 answers
28 views

LSTM accuracy VS F1-score

I am trying to do multi-classification on imbalanced data with 3 classes. The imbalance is something like 6:1:3. The total amount of samples is 7000. I use LSTM, and Word2Vec to vectorize the data. ...

1
2 3 4 5
24