Open lkp411 opened 1 year ago
np.rand
samples from $\mathcal{U}(0,1)$ by default (all positive), while torch.randn
samples from $\mathcal{N} (0, 1)$ by default, which will give you negative numbers. This kind of error gets thrown if there's negative values in the distance matrix.
See: https://github.com/lmcinnes/umap/issues/854#issuecomment-1959507992
I am trying to use a precomputed square distance matrix when using the reducer and I am running into a strange KeyError: 'precomputed'
When I do the following:
Everything works fine.
But when I use Pytorch to create the matrix like so:
I get a KeyError: 'precomputed'
What could be the potential cause of this? The memory layout of Pytorch tensors is exactly the same as that of numpy, and they are convertible to each other using the same allocated memory.