👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
Traceback (most recent call last):
File "C:/Users/49476/glory/work/docparser/DesignDocParser/src/uie/data_distill/train.py", line 194, in <module>
do_train()
File "C:/Users/49476/glory/work/docparser/DesignDocParser/src/uie/data_distill/train.py", line 110, in do_train
loss = sum([criterion(o, l) for o, l in zip(logits, labels)]) / 3
File "C:/Users/49476/glory/work/docparser/DesignDocParser/src/uie/data_distill/train.py", line 110, in <listcomp>
loss = sum([criterion(o, l) for o, l in zip(logits, labels)]) / 3
File "C:\Users\49476\glory\work\docparser\DesignDocParser\src\uie\data_distill\criterion.py", line 59, in __call__
loss = self._sparse_multilabel_categorical_crossentropy(
File "C:\Users\49476\glory\work\docparser\DesignDocParser\src\uie\data_distill\criterion.py", line 38, in _sparse_multilabel_categorical_crossentropy
y_pos_2 = paddle.take_along_axis(y_pred, y_true, axis=-1)
File "C:\Users\49476\anaconda3\envs\uie\lib\site-packages\paddle\tensor\manipulation.py", line 2854, in take_along_axis
indices = paddle.broadcast_to(indices, broadcast_shape)
File "C:\Users\49476\anaconda3\envs\uie\lib\site-packages\paddle\tensor\manipulation.py", line 1917, in broadcast_to
return _C_ops.expand_v2(x, 'shape', shape)
ValueError: (InvalidArgument) The 2th element of 'shape' for expand_v2 op must be greater than 0, but the value given is 0.
[Hint: Expected expand_shape[i] > 0, but received expand_shape[i]:0 <= 0:0.] (at ..\paddle\phi\infermeta\unary.cc:511)
[operator < expand_v2 > error]
报错:
经排查发现是labels的第三个维度是零的问题,但某个样本里没有有效信息,是允许的,希望特别处理下这种情况,谢谢。