Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jan 18, 2024
1 parent 0b9b375 commit f6d1254
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tensordict/_td.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,8 @@ def empty():
def unbind(key, val, tds=tds):
unbound = (
val.unbind(dim)
if not _is_tensor_collection(type(val))
if not isinstance(val, TensorDictBase)
# tensorclass is also unbound using plain unbind
else val._unbind(dim)
)
for td, _val in zip(tds, unbound):
Expand Down

0 comments on commit f6d1254

Please sign in to comment.