mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-01 03:12:49 +08:00
Fixed last dimension size check so that it doesn't trivially pass. (#1815)
Summary: Currently, it checks that the `2`th dimension of `p2` is the same size as the `2`th dimension of `p2` instead of `p1`. Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1815 Reviewed By: MichaelRamamonjisoa Differential Revision: D58586966 Pulled By: bottler fbshipit-source-id: d4f723fa264f90fe368c10825c1acdfdc4c406dc
This commit is contained in:
parent
302da69461
commit
717493cb79
@ -338,7 +338,7 @@ std::tuple<at::Tensor, at::Tensor> KNearestNeighborIdxCuda(
|
||||
|
||||
TORCH_CHECK((norm == 1) || (norm == 2), "Norm must be 1 or 2.");
|
||||
|
||||
TORCH_CHECK(p2.size(2) == D, "Point sets must have the same last dimension");
|
||||
TORCH_CHECK(p1.size(2) == D, "Point sets must have the same last dimension");
|
||||
auto long_dtype = lengths1.options().dtype(at::kLong);
|
||||
auto idxs = at::zeros({N, P1, K}, long_dtype);
|
||||
auto dists = at::zeros({N, P1, K}, p1.options());
|
||||
|
Loading…
x
Reference in New Issue
Block a user