torch.multinomial raises no error when sampling from zero weight and replacement=False. #125388
Labels
actionable
topic: docs
topic category
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🐛 Describe the bug
As in the example, torch.multinomial should raise an error.
If errors are not raised to block developers, it will happen that the wrong index samples are used to train the model without knowing it, like me.
Here is the code I executed:
I get the output:
Versions
Here is the version I'm using:
torch_version=2.2.2+cpu
The text was updated successfully, but these errors were encountered: