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'