Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kde.py #23

Open
wants to merge 2 commits into
base: approx-kde
Choose a base branch
from
Open

Update kde.py #23

wants to merge 2 commits into from

Conversation

ducha-aiki
Copy link

No description provided.

@ducha-aiki
Copy link
Author

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

@Parskatt
Copy link
Owner

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

@Parskatt
Copy link
Owner

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 Parskatt mentioned this pull request Feb 24, 2024
@Parskatt
Copy link
Owner

@ducha-aiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants