Traceback (most recent call last):
File "predict.py", line 155, in <module>
pred_tet(path_test=path_sim_webank_test, rate=1) # sample条件下设为1,否则训练语料可能会很少
File "predict.py", line 99, in pred_tet
target_names=target_names, digits=9)
File "/home/datad/pyroot/similartextKT/env/lib/python3.6/site-packages/sklearn/utils/validation.py", line 72, in inner_f
return f(**kwargs)
File "/home/datad/pyroot/similartextKT/env/lib/python3.6/site-packages/sklearn/metrics/_classification.py", line 1929, in classification_report
y_type, y_true, y_pred = _check_targets(y_true, y_pred)
File "/home/datad/pyroot/similartextKT/env/lib/python3.6/site-packages/sklearn/metrics/_classification.py", line 81, in _check_targets
check_consistent_length(y_true, y_pred)
File "/home/datad/pyroot/similartextKT/env/lib/python3.6/site-packages/sklearn/utils/validation.py", line 256, in check_consistent_length
" samples: %r" % [int(l) for l in lengths])
ValueError: Found input variables with inconsistent numbers of samples: [100, 0]
执行Keras-TextClassification/test/sentence_similarity/predit.py时报错:
我是想要完成短文本相似度的训练和使用。请问短文本相似度的是不是这个文件? 这个报错应该如何处理?谢谢!