You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I want to commend your code, it's excellent! Thank you very much for your work!
However, I have a question regarding the file Chapter03/4_drqn.py. Shouldn't it be possible to access the hidden states of the LSTM? Also, shouldn't it be reset at the beginning of each epoch? I looked for this in the book as well, and it wasn't clear to me.
The text was updated successfully, but these errors were encountered:
Also, shouldn't it be reset at the beginning of each epoch?
Good question! By default, the LSTM layer we use has stateful set to False, which is the typical use-case (unless we intentionally want to carryover states from the previous batch as a way to process longer sequences). This means that, after each batch of predictions (or training), the hidden states are reset.
There is no explicit state reset used in the code but if you would like to experiment, you could do so by using: agent.model.model.layers[1].reset_states()
I hope that gives you clarifications that you were looking for.
Thank you for your interest in the book and this code repository.
Hello!
First of all, I want to commend your code, it's excellent! Thank you very much for your work!
However, I have a question regarding the file Chapter03/4_drqn.py. Shouldn't it be possible to access the hidden states of the LSTM? Also, shouldn't it be reset at the beginning of each epoch? I looked for this in the book as well, and it wasn't clear to me.
The text was updated successfully, but these errors were encountered: