In this post, we will see how to resolve How to update/re-train an LSTM model when a new data arrives? Question: In a real-time application of Longe-Short Term Memory (LSTM) networks or Recurrent Neural Networks (RNN), the data would arrive ...

In this post, we will see how to resolve How to access the gradients of intermediate outputs during the training loop? Question: Let’s say I have following (relatively) small lstm model: First, let’s create some pseudo input/target data: Now, let’s ...

In this post, we will see how to resolve Training a RNN/LSTM model got KeyError equal to the val of the length Question: Trying to train this model I get the error “KeyError: 60” where actually 60 is the value ...

In this post, we will see how to resolve Understanding stacked LSTM layers Question: Consider the following RNN architecture : Note the timestep used is 60 and this architecture is developed for time series prediction ( more specifically, stock price ...

In this post, we will see how to resolve Why can the output of RNN layers, which is just the prediction of the next time step, represent the features of the entire time series? Question: Why can the output of ...

Question: I create a GRU model in Jax using Flax and I initialize the model parameters using model.init as follows: Unfortuantely for me, the FrozenDict params created by model.init only contains the weight and biases of the GRU, not the ...

Question: I am trying to generate a LSTM model using Keras. I create a simple sine wave example which contain more thang 1000 point to predict the next point. But the result is not good as i expected. When i ...

Question: I have a simple X_train and Y_train data: Arrays are numpy arrays. I am now trying to use the tf.data.Dataset class to load these as tensors. Before I have done a similar thing successfully using the following code: As ...

Question: I am fitting a stateful RNN with embedding layer to perform binary classification. I am having some confusion with the batch_size and batch_shape needed in the function APIs. The model structure: No issue when I fit the test data ...

Question: My model consists of an Embedding layer and a SimpleRNN layer. I have obtained the hidden states at all steps with model.predict, and plotted them against the steps. I find that the hidden states converge to zero but I ...