RoMa icon indicating copy to clipboard operation
RoMa copied to clipboard

Update kde.py

Open ducha-aiki opened this issue 1 year ago • 4 comments

ducha-aiki avatar Feb 23 '24 14:02 ducha-aiki

Even with this fix, we have an error:

    y = torch.multinomial(x, min(max_num_cmp,x.shape[-2]), replacement=False)
RuntimeError: cannot sample n_sample > prob_dist.size(-1) samples without replacement

ducha-aiki avatar Feb 23 '24 14:02 ducha-aiki

I think I was very stupid when I implemented this, let me actually run it for real.

Parskatt avatar Feb 23 '24 15:02 Parskatt

I keep confusing the syntax for np.random.choice and torch.multinomial... multinomial gives you inds from some pos measure. Should be more correct now.

Parskatt avatar Feb 24 '24 14:02 Parskatt

@ducha-aiki

Parskatt avatar Feb 24 '24 16:02 Parskatt