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

predict时报错(train没问题),麻烦大佬看看什么原因 #2

Open
Miaogai opened this issue May 28, 2020 · 2 comments
Open

Comments

@Miaogai
Copy link

Miaogai commented May 28, 2020

File "d:\ner2\model\LSTM_CRF.py", line 42, in forward
outputs, hidden = self.lstm(embedding)
File "D:\conda\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "D:\conda\lib\site-packages\torch\nn\modules\rnn.py", line 569, in forward
result = _VF.lstm(input, hx, self._flat_weights, self.bias, self.num_layers,
File "D:\conda\lib\site-packages\torch\nn\modules\module.py", line 593, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'LSTM' object has no attribute '_flat_weights'

@DengYangyong
Copy link
Owner

小熊弟,你这是window系统啊,我的是ubuntu系统。
pytorch的版本对了吗,torch==1.1.0

@Miaogai
Copy link
Author

Miaogai commented May 28, 2020

蟹蟹大佬,应该就是windows下pytorch的坑

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