-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recurrent examples fails with "TypeError: pad_sequence(): sequences must be tuple of Tensors, not Tensor" #154
Comments
I am using python 3.8.10, and torch 1.9.0, and pfrl 0.3.0 |
Thanks for reporting this. I was able to reproduce it.
|
Thank you so much! It is indeed working fine with torch==1.8.1 BTW on another point, it seems to me that we always have only two stacked states in train_recurrent_states in dqn.py. I could not find where to configure the number of states stacked for the recurrent layers. Is it possible to have more? |
If you need past recurrent states e.g. for updating the model, you can use recurrent states stored in the replay buffer Lines 532 to 542 in 7b0c7e9
|
I'm seeing this as well with torch 1.10 - is it planned to be fixed? |
Any fixes? Problem is still happening :( |
Hopefully #163 will address the TypeError issue. |
I found this problem can be fixed by repalcing the "nn.utils.rnn.pack_sequence(xs[:, None])" to "nn.utils.rnn.pack_sequence([xs])" |
So coooool! It works! |
Hello,
I am trying to implement recurrent network for an implementation of DDQL, so I did the same as the DRQL example, but my implem as the example crash with :
In batch_states.py line 33, the default_collate returns a tensor ( it is called first on a numpy array and then recursively on the tensor returned),
Then the full trace is
I have checked and the PPO example fails with the same error when started with recurrence.
Am I missing something?
The text was updated successfully, but these errors were encountered: