RuntimeError: Caught an unknown exception! #620
-
Hi all, I have been facing this problem and couldn't resolve this issue.
In the last time I encountered this issue, I managed to resolve it. It was due to having at least two same points in the dataset. So, I called np.unique or torch.unique before I feed the point cloud into fit_transform. However, in this time, I ran into the same runtimerror despite having no same point in the dataset. For example, the following line will generate the same error.
My guess is that SparseRipsPersistence will round them up to certain percision, such that the above two points have the same value and, hence, the error. If my guess is correct, is there any other way to avoid this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sorry for the delay in responding! I haven't observed this problem before but you may well be correct in your diagnosis. I think the point is that even though the points are slightly different in their 64-bit representations, the matrix of pairwise distances (whose computation is itself subject to numerical rounding errors) might end up being identically zero. Of course, you could always try to perturb each point's position independently with some very very small Gaussian noise. Let us know if that helps! |
Beta Was this translation helpful? Give feedback.
Sorry for the delay in responding! I haven't observed this problem before but you may well be correct in your diagnosis. I think the point is that even though the points are slightly different in their 64-bit representations, the matrix of pairwise distances (whose computation is itself subject to numerical rounding errors) might end up being identically zero.
Of course, you could always try to perturb each point's position independently with some very very small Gaussian noise. Let us know if that helps!