You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
1)PaddleNLP和PaddlePaddle版本:PaddleNLP 2.4.0,PaddlePaddle2.3.1
2)系统环境:Windows,python3.8
报错:
经排查发现是labels的第三个维度是零的问题,但某个样本里没有有效信息,是允许的,希望特别处理下这种情况,谢谢。
The text was updated successfully, but these errors were encountered: