Batch – Sending data from one batch to another
I having a little issue to understand the concept of passing params via batches.
I having a little issue to understand the concept of passing params via batches.
I am trying to understand the exact difference between React’s stateful and stateless components. Ok, stateless components just do something, but remember nothing, while stateful components may do the same, but they remember stuff within this.state
. That’s the theory.
Given a trained LSTM model I want to perform inference for single timesteps, i.e. seq_length = 1
in the example below. After each timestep the internal LSTM (memory and hidden) states need to be remembered for the next ‘batch’. For the very beginning of the inference the internal LSTM states init_c, init_h
are computed given the input. These are then stored in a LSTMStateTuple
object which is passed to the LSTM. During training this state is updated every timestep. However for inference I want the state
to be saved in between batches, i.e. the initial states only need to be computed at the very beginning and after that the LSTM states should be saved after each ‘batch’ (n=1).