paddlepaddle在传入模型的word,label的dataloader后数值突变。
Traceback (most recent call last):
File "main.py", line 119, in <module>
loss = loss_f(logits, labels)
File "/home/yhp/miniconda3/envs/yhpt/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 948, in __call__
return self.forward(*inputs, **kwargs)
File "/home/yhp/paddle/paddle-ner-master/src/model.py", line 21, in forward
loss = paddle.nn.functional.cross_entropy(x, label, ignore_index=-100)
File "/home/yhp/miniconda3/envs/yhpt/lib/python3.7/site-packages/paddle/nn/functional/loss.py", line 2393, in cross_entropy
label_min.item()))
ValueError: Target -4867214609213893293 is out of lower bound.
打印出来是这样
解决办法:更换paddlepaddle-gpu版本