Skip to content

Commit 5faccc4

Browse files
[BugFix] device in road_traffic scenario (#157)
1 parent ac30957 commit 5faccc4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vmas/scenarios/road_traffic.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,11 @@ def init_params(self, batch_dim, device, **kwargs):
745745

746746
self.distances = Distances(
747747
agents=torch.zeros(
748-
batch_dim, self.n_agents, self.n_agents, dtype=torch.float32
748+
batch_dim,
749+
self.n_agents,
750+
self.n_agents,
751+
device=device,
752+
dtype=torch.float32,
749753
),
750754
left_boundaries=torch.zeros(
751755
(batch_dim, self.n_agents, 1 + 4), device=device, dtype=torch.float32

0 commit comments

Comments
 (0)