Skip to content

Commit

Permalink
Update _lazy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens authored Feb 3, 2024
1 parent 5302ac1 commit e722059
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tensordict/_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2040,9 +2040,7 @@ def update_(
# no op
return self
if not is_tensor_collection(input_dict_or_td):
input_dict_or_td = TensorDict.from_dict(
input_dict_or_td, batch_dims=self.batch_dims
)
input_dict_or_td = TensorDict.from_dict(input_dict_or_td)
if input_dict_or_td.batch_size[self.stack_dim] != len(self.tensordicts):
raise ValueError("cannot update stacked tensordicts with different shapes.")
for td_dest, td_source in zip(
Expand Down

0 comments on commit e722059

Please sign in to comment.