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

During training the net, i got this RuntimeError: probability tensor contains either inf, nan or element < 0 #48

Open
misayllk opened this issue Nov 11, 2022 · 0 comments

Comments

@misayllk
Copy link

I have used the train_net.py, but some problems appeared,
first i got the 'line 68, in forward wt.index_copy(0, ind, torch.multinomial(prob_prev, 1).view(-1).index_select(0, ind))
RuntimeError: invalid multinomial distribution (sum of probabilities <= 0)' ,but when i cleared the memory and re-run the train_net_py,it could work successfully until the 10 epoch
In 10th epoch,i got this:
File "D:\llk\xmodaler-master\xmodaler\modeling\meta_arch\rnn_att_enc_dec.py", line 68, in forward
wt.index_copy
(0, ind, torch.multinomial(prob_prev, 1).view(-1).index_select(0, ind)) #####bug
RuntimeError: probability tensor contains either inf, nan or element < 0
Can somebody help me??😥

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

No branches or pull requests

1 participant