Skip to content

Commit 41665ba

Browse files
authored
Merge pull request #10 from aidos-lab/dev-jpga
Add device for linspace in function compute_ect_edges
2 parents bc06ae1 + a35b0ef commit 41665ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dect/ect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def compute_ect_edges(
287287

288288
# Node heights have shape [num_points, num_directions]
289289
nh = x @ v
290-
lin = torch.linspace(-radius, radius, resolution).view(-1, 1, 1)
290+
lin = torch.linspace(-radius, radius, resolution, device=x.device).view(-1, 1, 1)
291291
ecc = torch.nn.functional.sigmoid(scale * torch.sub(lin, nh))
292292
output = torch.zeros(
293293
size=out_shape,

0 commit comments

Comments
 (0)