lstm

LSTM Model overfitting or under-fitting?

LSTM Model overfitting or under-fitting? Question: I am working on an LSTM model that predicts Bitcoin price. Using: time_steps = 20, epochs = 100, batch_size = 256. I get the attached Model Loss Plot.MODEL LOSS PLOT And I also attached the actual vs predicted BTC prices. Actual VS Predict PLOT Is this model overfitting or …

Total answers: 4

epoch taking too long,

epoch taking too long, Question: I have a good pc with good memory (intel core i7-11th gen, and 16gb of ram) still each of my epochs are taking about 1,5 hour, is it normal to take this long? from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM # define model model = …

Total answers: 1

What is the input dimension for a LSTM in Keras?

What is the input dimension for a LSTM in Keras? Question: I’m trying to use deeplearning with LSTM in keras . I use a number of signal as input (nb_sig) that may vary during the training with a fixed number of samples (nb_sample) I would like to make parameter identification, so my output layer is …

Total answers: 3

Keras LSTM None value output shape

Keras LSTM None value output shape Question: this is my data X_train prepared for LSTM of shape (7000, 2, 200) [[[0.500858 0. 0.5074856 … 1. 0.4911533 0. ] [0.4897923 0. 0.48860878 … 0. 0.49446714 1. ]] [[0.52411383 0. 0.52482396 … 0. 0.48860878 1. ] [0.4899698 0. 0.48819458 … 1. 0.4968341 1. ]] … [[0.6124623 1. …

Total answers: 1

How does it work a Multi-Layer GRU/LSTM in Pytorch

How does it work a Multi-Layer GRU/LSTM in Pytorch Question: I’m trying to understand exactly how the calculation are performed in the GRU pytorch class. I’m having some troubles while reading the GRU pytorch documetation and the LSTM TorchScript documentation with its code implementation. In the GRU documentation is stated: In a multilayer GRU, the …

Total answers: 2

how to reshape array to predict with LSTM

how to reshape array to predict with LSTM Question: I made an LSTM model based on this tutorial where the model input batch shape is: print(config["layers"][0]["config"]["batch_input_shape"]) returns: (None, 1, 96) Can someone give me a tip on how change my testing data to this array shape to match the model input batch size? testday = …

Total answers: 1

How to combine a masked loss with tensorflow2 TimeSeriesGenerator

How to combine a masked loss with tensorflow2 TimeSeriesGenerator Question: We are trying to use a convolutional LSTM to predict the values of an image given the past 7 timesteps. We have used the tensorflow2 TimeSeriesGenerator method to create our time series data: train_gen = TimeseriesGenerator( data, data, length=7, batch_size=32, shuffle=False ) Every image (timestep) …

Total answers: 1

MinMaxScaler Python Changes original Data

MinMaxScaler Python Changes original Data Question: I am trying to have 4 of my 5 csv column to predict the last column. i used MinMaxScaler to scale my data to 0-1 range, but at some point when i want to invers_transform it, MinMaxScaler changes my original data. Here is my Code: dataset = read_csv(‘zz.csv’, header=0, …

Total answers: 1

FastAI Multilayer LSTM not learning, accuracy decreases while training

FastAI Multilayer LSTM not learning, accuracy decreases while training Question: I’m following Chapter 12 on RNNs/LSTMs from scratch in the fastai book, but getting stuck trying to train a custom built LSTM from scratch. Here is my code This is the boilerplate bit (following the examples in the book) from fastai.text.all import * path = …

Total answers: 1