FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

ser_vi_layoutxlm/vqa_utils.py 中代码是否有必要?默认值为-100

Open cumthxy opened this issue 2 months ago • 2 comments

https://github.com/PaddlePaddle/FastDeploy/blob/develop/python/fastdeploy/vision/ocr/ppocr/utils/ser_vi_layoutxlm/vqa_utils.py#L316 此行代码是否有必要? paddle.nn.CrossEntropyLoss().ignore_index 这个值不是默认值-100么?

cumthxy avatar Apr 12 '24 04:04 cumthxy

是的,需要加这行代码

juncaipeng avatar Apr 15 '24 08:04 juncaipeng

是的,需要加这行代码

为什么?每次不都是读取的-100,这行代码直接写成-100不行么

cumthxy avatar Apr 15 '24 08:04 cumthxy