Skip to content
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

[BUG] Unbind resets nested batch sizes #469

Closed
matteobettini opened this issue Jul 3, 2023 · 1 comment · Fixed by #471
Closed

[BUG] Unbind resets nested batch sizes #469

matteobettini opened this issue Jul 3, 2023 · 1 comment · Fixed by #471
Assignees
Labels
bug Something isn't working

Comments

@matteobettini
Copy link
Contributor

td = TensorDict({"a": TensorDict({"b": torch.zeros(2,3)}, [2,3])},[2])
td["a"].batch_size # torch.Size([2, 3])
tds = td.unbind(0)
tds[0]["a"].batch_size # torch.Size([]) should be torch.Size([3])
@matteobettini matteobettini added the bug Something isn't working label Jul 3, 2023
@matteobettini
Copy link
Contributor Author

matteobettini commented Jul 3, 2023

I think this is a problem stemming from the fact that apply disregards the nested batch sizes. If you want I can look into it, just let me know

@vmoens vmoens linked a pull request Jul 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants