recurrent-neural-network

Keras SimpleRNNCell appears to fail to distribute learning among all its weights

Keras SimpleRNNCell appears to fail to distribute learning among all its weights Question: This question is about SimpleRNNCell, a class in Tensorflow to perform basic Recurrent Neural Network. Unless there’s something fundamentally wrong in my code, it appears that training is not spread over all the available weights but only a subset of them, making …

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

Multi dimensional input multi dimensional output rnn keras data preprocessing

Multi dimensional input multi dimensional output rnn keras data preprocessing Question: I want to create a RNN model in Keras. In each time-step the input has 9 element and the output has 4 element. input_size = (304414,9) target_size = (304414,4) How can I create a dataset of sliding windows over the time-series. Asked By: Arman …

Total answers: 1

What it means when your model can't overfit a small batch of data?

What it means when your model can't overfit a small batch of data? Question: I am trying to train RNN model to classify sentences into 4 classes, but it doesn’t seem to work. I tried to overfit 4 examples (blue line) which worked, but even as little as 8 examples (red line) is not working, …

Total answers: 1

How would one use a RNN when predicting temperature?

How would one use a RNN when predicting temperature? Question: Let’s assume I have a dataframe with several features, like humidity, pressure, and so on. One of these columns, would be temperature. At each row, I have the data for one day. I would like to predict the temperature for the next day, with past …

Total answers: 1

Advisable ways to shape my data as input for a RNN

Advisable ways to shape my data as input for a RNN Question: I have a dataframe X, where each row is a data point in time and each column is a feature. The label/target variable Y is univariate. One of the columns of X is the lagged values of Y. The RNN input is of …

Total answers: 1

How to include future values in a time series prediction of a RNN in Keras

How to include future values in a time series prediction of a RNN in Keras Question: I currently have a RNN model for time series predictions. It uses 3 input features "value", "temperature" and "hour of the day" of the last 96 time steps to predict the next 96 time steps of the feature "value". …

Total answers: 2

Dynamic RNN in Keras: Use Custom RNN Cell to Track Other Outputs at Each Timestep

Dynamic RNN in Keras: Use Custom RNN Cell to Track Other Outputs at Each Timestep Question: Is there a way to return multiple outputs for a given timestep when implementing a custom cell for an RNN in keras? E.g. outputs with shapes: (sequences=[batch, timesteps, hidden_units], other_outputs=[batch, timesteps, arbitrary_units], last_hidden_states=[batch, hidden_units]) My motivation for this stems …

Total answers: 1

Encoder-Decoder LSTM model gives 'nan' loss and predictions

Encoder-Decoder LSTM model gives 'nan' loss and predictions Question: I am trying to create a basic encoder-decoder model for training a chatbot. X contains the questions or human dialogues and Y contains the bot answers. I have padded the sequences to the max size of input and output sentences. X.shape = (2363, 242, 1) and …

Total answers: 1

How to embed Sequence of Sentences in RNN?

How to embed Sequence of Sentences in RNN? Question: I am trying to make a RNN model (in Pytorch), that takes couple of sentences and then classifies it to be either Class 0 or Class 1. For the sake of this question let’s assume that the max_len of the sentence is 4 and max_amount of …

Total answers: 1