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
By default, torch.stack(list_of_tds, dim) will return a LazyStackedTensorDict object.
Keeping the discussion about the usefulness of this class apart, it may be more desirable to have a LazyStackedTensorDict created only when it is explicitely asked by the user, e.g.
The main advantage is that working with LazyStackedTensorDict can be computationally expensive and users may not be aware of this bottleneck.
Also, when called on lists of torch.Tensor objects, torch.stack does not return a non-contiguous object. Aligning TensorDict behaviour to this might be beneficial for consistency purposes.
The text was updated successfully, but these errors were encountered:
Benjamin-eecs
changed the title
Default creation of LazyStackedTensorDict vs TensorDict when calling torch.stack?
[Feature Request] Default creation of LazyStackedTensorDict vs TensorDict when calling torch.stack?
Jul 21, 2022
By default,
torch.stack(list_of_tds, dim)
will return aLazyStackedTensorDict
object.Keeping the discussion about the usefulness of this class apart, it may be more desirable to have a
LazyStackedTensorDict
created only when it is explicitely asked by the user, e.g.The main advantage is that working with
LazyStackedTensorDict
can be computationally expensive and users may not be aware of this bottleneck.Also, when called on lists of
torch.Tensor
objects,torch.stack
does not return a non-contiguous object. AligningTensorDict
behaviour to this might be beneficial for consistency purposes.The text was updated successfully, but these errors were encountered: