Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

adding "from matchbox import functional as F" casue error #19

Open
gameking157 opened this issue Jul 23, 2019 · 0 comments
Open

adding "from matchbox import functional as F" casue error #19

gameking157 opened this issue Jul 23, 2019 · 0 comments

Comments

@gameking157
Copy link

I am modifying seq2seq codes ( https://github.com/keon/seq2seq). It is very weird that when replace "from torch.nn import functional as F" using "from matchbox import functional as F" in train.py, error occurs. Removing "from torch.nn import functional as F", the code run successfully.
pytorch 0.4.0
File "/tmp/batchlatticelstm/bak/model.py", line 102, in forward
encoder_output, hidden = self.encoder(src)
File "/home/wds/anaconda3/envs/pytorch_0.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/tmp/batchlatticelstm/bak/model.py", line 24, in forward
outputs, hidden = self.gru(embedded, hidden)
File "/home/wds/anaconda3/envs/pytorch_0.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/anaconda3/envs/pytorch_0.4/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 166, in forward
requires_grad=False)
TypeError: inner() got an unexpected keyword argument 'requires_grad'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant