BrikerMan / Kashgari

Kashgari is a production-level NLP Transfer learning framework built on top of tf.keras for text-labeling and text-classification, includes Word2Vec, BERT, and GPT2 Language Embedding.
http://kashgari.readthedocs.io/
Apache License 2.0
2.4k stars 441 forks source link

[Question] 为什么使用Bilstm+Crf时,实际有33个类别,但CRF转移矩阵尺寸大小为35*35,导致无法预测 #468

Closed LiangYuHai closed 3 years ago

LiangYuHai commented 3 years ago

如下报错 (0) Invalid argument: Input to reshape is a tensor with 399000 values, but the requested shape has 376200 [[{{node layer_crf_dense/Tensordot}}]] [[layer_crf/mul/_2999]] (1) Invalid argument: Input to reshape is a tensor with 399000 values, but the requested shape has 376200 [[{{node layer_crf_dense/Tensordot}}]] [Paste requirements.txt file here]


检查model_info.json,发现layer_crf的output_dim为33,但转移概率矩阵却是35*35
[A clear and concise description of what you want to know.]