PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

[General Issue] 样本损失权重

Open chen-del opened this issue 3 years ago • 1 comments

负样本损失权重也就是背景权重,在那个地方可以设置,因为要分割的类别像素相比于背景像素要少很多,我想将负样本损失权重增大,用于减少像素误分割的,请问我需要在yml文件中的那个位置进行设置。

chen-del avatar Aug 14 '22 14:08 chen-del

https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.6/paddleseg/models/losses/cross_entropy_loss.py#L40 cross entropy loss中的weight参数可以设置各个类别的权重,在yml中loss设置中增加weight及设置的参数即可。

haoyuying avatar Aug 15 '22 08:08 haoyuying

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 05 '22 17:12 github-actions[bot]