hfslyc / AdvSemiSeg

Adversarial Learning for Semi-supervised Semantic Segmentation, BMVC 2018
502 stars 129 forks source link

loss_semi_adv&&loss_adv_pred #20

Closed LeiyuanMa closed 5 years ago

LeiyuanMa commented 5 years ago

It seems loss_semi_adv&&loss_adv_pred alwayes contribute to the network during training, I understandt that : loss_adv_pred = bce_loss(D_out, make_D_label(gt_label, ignore_mask)) is using the gt_label,cause the pred is come from labeled data,but loss_semi_adv = args.lambda_semi_adv * bce_loss(D_out, make_D_label(gt_label, ignore_mask_remain)) why this loss also using the gt_label,the data is come from the trainloader_remain_iter...?

hfslyc commented 5 years ago

Hi,

gt_label is simply 1. It's the binary class index that represents gt in the discriminator training. In the semi-supervised loss, we also want to push the unlabeled data's prediction toward the gt distribution.

Hope this explanation help :)

LeiyuanMa commented 5 years ago

"With this loss, we train the segmentation network to fool the discriminator by maximizing the probability of the predicted results being generated from the ground truth distribution" Is that the meaning of this sentence?

hfslyc commented 5 years ago

Yes

On Tue, Oct 23, 2018 at 5:40 PM Degage notifications@github.com wrote:

"With this loss, we train the segmentation network to fool the discriminator by maximizing the probability of the predicted results being generated from the ground truth distribution" Is that the meaning of this sentence?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/hfslyc/AdvSemiSeg/issues/20#issuecomment-432470990, or mute the thread https://github.com/notifications/unsubscribe-auth/AKhYAWwPPuxUgS7Xbh7TCrROrhTmwDdoks5un7cGgaJpZM4X1Gu2 .

LeiyuanMa commented 5 years ago

Thank you !