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

ner/train_crf_loss.py Error #9

Closed
666XD opened this issue Apr 15, 2018 · 0 comments
Closed

ner/train_crf_loss.py Error #9

666XD opened this issue Apr 15, 2018 · 0 comments

Comments

@666XD
Copy link

666XD commented Apr 15, 2018

目前program run 在 ubuntu python3.5
在 ner/train_crf_loss.py 142 行的測試的部分,遇到以下的 Error

try load model from ./s2ss_crf.ckpt
0%| | 0/100 [00:00<?, ?it/s]Traceback (most recent call last):

File "train_crf_loss.py", line 179, in <module>
main()
File "train_crf_loss.py", line 175, in main
test(True, 'lstm', 1, False, True, False, 64, 'tanh')
File "train_crf_loss.py", line 142, in test
if rr:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

看了一下 rr 是 numpy,所以直接用 if rr: 好像會出問題
要把他轉成 list 或是用 if not np.isnan(rr).any() ?
因為 code 還沒完全理解,所以不曉得是我的過程有問題還是code問題

@666XD 666XD changed the title ner train_crf_loss.py Error ner/train_crf_loss.py Error Apr 15, 2018
@666XD 666XD closed this as completed Jun 1, 2021
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

1 participant