stanleylsx / entity_extractor_by_ner

基于Tensorflow2.3开发的NER模型,都是CRF范式,包含Bilstm(IDCNN)-CRF、Bert-Bilstm(IDCNN)-CRF、Bert-CRF,可微调预训练模型,可对抗学习,用于命名实体识别,配置后可直接运行。
393 stars 74 forks source link

自己准备好训练集之后出现这种情况,请问怎么解决 #21

Closed End1i closed 3 years ago

End1i commented 3 years ago

Traceback (most recent call last): File "G:/BERT+BiLSTM/entity_extractor_by_ner-master/main.py", line 72, in train(configs, dataManager, logger) File "G:\BERT+BiLSTM\entity_extractor_by_ner-master\engines\train.py", line 81, in train inputs=model_inputs, inputs_length=inputs_length, targets=y_train_batch, training=1) File "H:\解释器\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 985, in call outputs = call_fn(inputs, *args, kwargs) File "H:\解释器\lib\site-packages\tensorflow\python\eager\def_function.py", line 780, in call result = self._call(*args, *kwds) File "H:\解释器\lib\site-packages\tensorflow\python\eager\def_function.py", line 807, in _call return self._stateless_fn(args, kwds) # pylint: disable=not-callable File "H:\解释器\lib\site-packages\tensorflow\python\eager\function.py", line 2829, in call return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access File "H:\解释器\lib\site-packages\tensorflow\python\eager\function.py", line 1848, in _filtered_call cancellation_manager=cancellation_manager) File "H:\解释器\lib\site-packages\tensorflow\python\eager\function.py", line 1933, in _call_flat cancellation_manager=cancellation_manager) File "H:\解释器\lib\site-packages\tensorflow\python\eager\function.py", line 550, in call ctx=ctx) File "H:\解释器\lib\site-packages\tensorflow\python\eager\execute.py", line 60, in quick_execute inputs, attrs, num_outputs) tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,22] = -16 is not in [0, 256) [[{{node cond_5/else/_1/cond/GatherV2_1}}]] [Op:__forward_call_7380]

Function call stack: call

Process finished with exit code 1