Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] fix weighted cross_entropy bug when 255 in label #1499

Merged
merged 1 commit into from
Nov 5, 2021

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.

None yet

2 participants