PaddleSeg
PaddleSeg copied to clipboard
[General Issue] 样本损失权重
负样本损失权重也就是背景权重,在那个地方可以设置,因为要分割的类别像素相比于背景像素要少很多,我想将负样本损失权重增大,用于减少像素误分割的,请问我需要在yml文件中的那个位置进行设置。
https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.6/paddleseg/models/losses/cross_entropy_loss.py#L40 cross entropy loss中的weight参数可以设置各个类别的权重,在yml中loss设置中增加weight及设置的参数即可。
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.