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

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

@gameking157

Description

@gameking157

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions