Skip to content

Commit

Permalink
clone road graph tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
daphne-cornelisse committed Jan 2, 2025
1 parent 4050069 commit 5b29b11
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 19 deletions.
70 changes: 52 additions & 18 deletions integrations/models/notebooks/00_align_simulators_vbd.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pygpudrive/datatypes/roadgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def from_tensor(
):
"""Creates a GlobalRoadGraphPoints instance from a tensor."""
if backend == "torch":
return cls(roadgraph_tensor.to_torch().to(device))
return cls(roadgraph_tensor.to_torch().clone().to(device))
elif backend == "jax":
raise NotImplementedError("JAX backend not implemented yet.")

Expand Down

0 comments on commit 5b29b11

Please sign in to comment.