diff --git a/CMakeLists.txt b/CMakeLists.txt index 231d3c83..10ae1eb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(EXTERNAL_DEP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external) include(DownloadExternalDeps) download_dep(numpyeigen GIT_REPOSITORY https://github.com/fwilliams/numpyeigen.git - GIT_TAG 6db66f68b9f94ca8e8ddb569af33daa72bb6a810 + GIT_TAG cc6e629930317c709fbb5fa29486f0b324786d09 ) list(APPEND CMAKE_MODULE_PATH ${EXTERNAL_DEP_DIR}/numpyeigen/cmake) set(CMAKE_POSITION_INDEPENDENT_CODE ON) diff --git a/point_cloud_utils/sinkhorn.py b/point_cloud_utils/sinkhorn.py index 57eeca43..d262afad 100644 --- a/point_cloud_utils/sinkhorn.py +++ b/point_cloud_utils/sinkhorn.py @@ -35,8 +35,9 @@ def chamfer(a, b): :param b: A m-sized minibatch of point sets in R^d. i.e. shape [m, n_b, d] :return: A [m] shaped tensor storing the Chamfer distance between each minibatch entry """ - M = pairwise_distances(a, b, squeeze=False) - print(M.shape) + M = pairwise_distances(a, b) + if len(M.shape) == 2: + M = M[np.newaxis, :, :] return M.min(1).sum(1) + M.min(2).sum(1)