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
Support for nested tensors should work as torch.stack(tensordicts, 0)
(we can't currently override torch.nested.as_nested_tensor so we'll need to write a custom op)
We don't need to subclass TensorDict for this but there are a few caveats:
Reshaping won't be allowed
Shape can't be accessed
Indexing can only be done on the first dim
For instance, populating a tensordict with a nested tensor won't work as we can't access the shape.
If nested tensors are found in a tensordict, all tensors should have that feature.
Indexing such a tensordict along the second dimension will require:
splitting the tensors that are nested
indexing those tensors
re-nesting them
The text was updated successfully, but these errors were encountered:
Motivation
Support for nested tensors should work as
torch.stack(tensordicts, 0)
(we can't currently override
torch.nested.as_nested_tensor
so we'll need to write a custom op)We don't need to subclass TensorDict for this but there are a few caveats:
For instance, populating a tensordict with a nested tensor won't work as we can't access the shape.
If nested tensors are found in a tensordict, all tensors should have that feature.
Indexing such a tensordict along the second dimension will require:
The text was updated successfully, but these errors were encountered: