You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have finetuned inverse paraphraser on custom dataset. Model has been saved. Now I am trying to load this model by running demo_paraphraser.py but it's giving RuntimeError: probability tensor contains either inf, nan or element < 0
Essentially, this error is occurring when line number 313 of style_paraphrase/utils.py starts running. This line is next_token = torch.multinomial(F.softmax(filtered_logits, dim=-1), num_samples=1)
Found some solutions but they didn't work. One of those solutions is to replace above line with the following next_token = torch.multinomial(F.softmax(filtered_logits, dim=-1), num_samples=num_samples).
Also tried downgrading torch to 1.1.0 but the files in saved model with extension .bin are unable to be loaded with versions smaller than 1.6.0.
Any help in this regard will be appreciated.
The text was updated successfully, but these errors were encountered:
Hi! I have finetuned inverse paraphraser on custom dataset. Model has been saved. Now I am trying to load this model by running demo_paraphraser.py but it's giving RuntimeError: probability tensor contains either inf, nan or element < 0 Essentially, this error is occurring when line number 313 of style_paraphrase/utils.py starts running. This line is next_token = torch.multinomial(F.softmax(filtered_logits, dim=-1), num_samples=1) Found some solutions but they didn't work. One of those solutions is to replace above line with the following next_token = torch.multinomial(F.softmax(filtered_logits, dim=-1), num_samples=num_samples). Also tried downgrading torch to 1.1.0 but the files in saved model with extension .bin are unable to be loaded with versions smaller than 1.6.0. Any help in this regard will be appreciated.
I am also facing the same error. Here is the screenshot as well.
Hi! I have finetuned inverse paraphraser on custom dataset. Model has been saved. Now I am trying to load this model by running demo_paraphraser.py but it's giving
RuntimeError: probability tensor contains either inf, nan or element < 0
Essentially, this error is occurring when line number 313 of style_paraphrase/utils.py starts running. This line is
next_token = torch.multinomial(F.softmax(filtered_logits, dim=-1), num_samples=1)
Found some solutions but they didn't work. One of those solutions is to replace above line with the following
next_token = torch.multinomial(F.softmax(filtered_logits, dim=-1), num_samples=num_samples)
.Also tried downgrading torch to 1.1.0 but the files in saved model with extension .bin are unable to be loaded with versions smaller than 1.6.0.
Any help in this regard will be appreciated.
The text was updated successfully, but these errors were encountered: