Skip to content

Conversation

@LutaoChu
Copy link
Contributor

@LutaoChu LutaoChu commented Nov 5, 2021

当cross entropy带权重参数,且label中有255,cross entropy会抛出异常。

PaddleSeg CrossEntropy Version Paddle Version 255 in label is OK?
short weight 2.1.2、2.1.3 ValueError: Expected 0 <= label_value < class_dimension(10), but got [0] <= label_value <= [255]
long_weight 2.1.2、2.1.3 ValueError: Expected 0 <= label_value < class_dimension(10), but got [0] <= label_value <= [255]
long_weight paddle dev ValueError: input's class_dimension(10) must equal to weight's class_dimension(256) when weight is provided
short weight paddle dev OK
short weight 2.1.3 no 255 OK

因此去除long weight进行修复
solve #1491 #1490

@michaelowenliu michaelowenliu merged commit 11d7807 into PaddlePaddle:develop Nov 5, 2021
LutaoChu added a commit to LutaoChu/PaddleSeg that referenced this pull request Dec 2, 2021
@LutaoChu LutaoChu mentioned this pull request Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants