"...distributed/git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "d27a321abd3ec511bcf4f356958010e201142556"
Commit 8b30d1c7 authored by rusty1s's avatar rusty1s
Browse files

update

parents 987a1766 eecbd236
...@@ -38,6 +38,7 @@ def nearest(x: torch.Tensor, y: torch.Tensor, ...@@ -38,6 +38,7 @@ def nearest(x: torch.Tensor, y: torch.Tensor,
x = x.view(-1, 1) if x.dim() == 1 else x x = x.view(-1, 1) if x.dim() == 1 else x
y = y.view(-1, 1) if y.dim() == 1 else y y = y.view(-1, 1) if y.dim() == 1 else y
assert x.size(1) == y.size(1)
if x.is_cuda: if x.is_cuda:
if batch_x is not None: if batch_x is not None:
...@@ -66,8 +67,6 @@ def nearest(x: torch.Tensor, y: torch.Tensor, ...@@ -66,8 +67,6 @@ def nearest(x: torch.Tensor, y: torch.Tensor,
return torch.ops.torch_cluster.nearest(x, y, ptr_x, ptr_y) return torch.ops.torch_cluster.nearest(x, y, ptr_x, ptr_y)
else: else:
assert x.size(1) == y.size(1)
# Translate and rescale x and y to [0, 1]. # Translate and rescale x and y to [0, 1].
if batch_x is not None and batch_y is not None: if batch_x is not None and batch_y is not None:
assert x.dim() == 2 and batch_x.dim() == 1 assert x.dim() == 2 and batch_x.dim() == 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment