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

TypeError: normal() received an invalid combination of arguments - got (means=Tensor, std=float, ), #19

Open
hyeseonko opened this issue Feb 13, 2019 · 1 comment

Comments

@hyeseonko
Copy link

Hi, when I run run_snli.py, it does not work. :'(

python run_snli.py --data_path ./data/snli_lm --no_earlystopping

then..I encountered the TypeError as below. Do you know any solutions?

Traceback (most recent call last):
File "run_snli.py", line 103, in
exec(open("train.py").read())
File "", line 434, in
File "", line 389, in train
File "", line 247, in train_ae
File "C:\Users\hsko0\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "D:\Generation\ARAE\lang\models.py", line 174, in forward
hidden = self.encode(indices, lengths, noise)
File "D:\Generation\ARAE\lang\models.py", line 199, in encode
std=self.noise_r)
TypeError: normal() received an invalid combination of arguments - got (means=Tensor, std=float, ), but expected one of:

  • (Tensor mean, Tensor std, torch.Generator generator, Tensor out)
  • (Tensor mean, float std, torch.Generator generator, Tensor out)
  • (float mean, Tensor std, torch.Generator generator, Tensor out)
@jasonyu1996
Copy link

It's an API change of pytorch. means has been changed into mean

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

2 participants