Skip to content

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