Closed chuxiang93 closed 4 years ago
We produce two channels for the prediction (foreground and background). Meanwhile, the mask is only one channel.
OK, I got it. Thank you.
Hi, Thanks for your great work! For a 5 classes task, could you tell me the number in front of "mask" should be 2 or 5 for a 5 classes task.
consistency_dist = torch.sum(maskconsistency_dist)/(2torch.sum(mask)+1e-16) consistency_loss = consistency_weight * consistency_dist loss = supervised_loss + consistency_loss
Best.
It should be 5.
Thans for your reply!
------------------ 原始邮件 ------------------ 发件人: "yulequan/UA-MT" @.>; 发送时间: 2022年3月12日(星期六) 下午4:36 @.>; @.**@.>; 主题: Re: [yulequan/UA-MT] A small code detail problem (#7)
It should be 5.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
Hi, @yulequan Thank you for opening the source code, I viewed the code carefully and had a small question.
consistency_dist = torch.sum(mask*consistency_dist)/(2*torch.sum(mask)+1e-16) consistency_loss = consistency_weight * consistency_dist loss = supervised_loss + consistency_loss
You can see that, in calculating consistency_dist, the sum of mask needs to be multiplied by 2. I'm curious why do you multiply this by 2 here?Looking forward to your reply. Best, Jianqiang Ma