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, thank you very much for your easy-to-follow implementation! Very intuitive and simple. 👍
My question is about your use of LSTMCell to implement the recurrent version of A3C.
As it sounds from your code, you have used single timestep data (in your batch feeding to the model) to update your model including (the LSTMCell part) however, if it was intended to implement a recurrent procedure then you should have performed forward pass of the LSTMCell on each timestep in your recurrent part but it's missing thus, hidden states/cell states of the LSTMCell does not contribute to the gradient flow.
Simply put, I mean such a part is missing:
foriininputs:
# Step through the sequence one element at a time.# after each step, hidden contains the hidden state.out, hidden=lstm(i, hidden)
Otherwise, hx and cxshould not have been detached:
Am I right? Or I'm missing something?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
alirezakazemipour
changed the title
Sceptism about the correctness of the use of LSTMCell
Scepticism about the correctness of the use of LSTMCell
Feb 1, 2022
alirezakazemipour
changed the title
Scepticism about the correctness of the use of LSTMCell
Scepticism about the correctness of the use of the LSTMCell
Feb 1, 2022
Hi,
First of all, thank you very much for your easy-to-follow implementation! Very intuitive and simple. 👍
My question is about your use of LSTMCell to implement the recurrent version of A3C.
As it sounds from your code, you have used single timestep data (in your batch feeding to the model) to update your model including (the LSTMCell part) however, if it was intended to implement a recurrent procedure then you should have performed forward pass of the LSTMCell on each timestep in your recurrent part but it's missing thus, hidden states/cell states of the LSTMCell does not contribute to the gradient flow.
Simply put, I mean such a part is missing:
Otherwise,
hx
andcx
should not have been detached:pytorch-a3c/train.py
Line 42 in 48d9584
pytorch-a3c/train.py
Line 43 in 48d9584
Am I right? Or I'm missing something?
Thank you in advance.
The text was updated successfully, but these errors were encountered: