-
Notifications
You must be signed in to change notification settings - Fork 649
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
IndexError: index 0 is out of bounds for axis 0 with size 0 train_cws_lstm.py 中报的错,一直没有解决 #57
Comments
应该不是bug,可能那个地方没正确传入参数,比如tag数之类的 |
对对对 我知道不是模型的问题 大概就是传参问题 我试着输出了这一步的传入viterbi_decode()函数的参数tf_unary_scores_和 |
[100] loss: [28.518539]
[200] loss: [17.184589]
[300] loss: [14.19612]
[400] loss: [13.810515]
[500] loss: [11.092119]
[600] loss: [10.731837]
[700] loss: [10.634817]
[800] loss: [8.1204176]
[900] loss: [8.273036]
[1000] loss: [8.4017849]
Traceback (most recent call last):
File "train_cws_lstm_PKU0421.py", line 288, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "train_cws_lstm_PKU0421.py", line 278, in main
model.inp, tX, tY)
File "train_cws_lstm_PKU0421.py", line 224, in test_evaluate
tf_unary_scores_, transMatrix)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/crf/python/ops/crf.py", line 298, in viterbi_decode
trellis[0] = score[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
大神帮帮忙 每次走到test_evaluate()都会报这个错,我看bug出现在crf.py里,实在是不懂,求指点
The text was updated successfully, but these errors were encountered: