BIT-DA / SePiCo

[TPAMI 2023 ESI Highly Cited Paper] SePiCo: Semantic-Guided Pixel Contrast for Domain Adaptive Semantic Segmentation https://arxiv.org/abs/2204.08808
https://arxiv.org/abs/2204.08808
Other
112 stars 7 forks source link

if Lreg < 0? #23

Closed TongkunGuan closed 12 months ago

TongkunGuan commented 12 months ago

To compute proto_reg: contrast_norm = num_classes * np.log(num_classes) proto_sim = mean_feat.mm(mean.permute(1, 0).contiguous()) / contrast_temp loss = torch.sum(torch.softmax(proto_sim, dim=1).log()) / contrast_norm

reg_weight * proto_reg(feat, mean, contrast_temp, contrast_norm=contrast_norm)

Why loss need < 0? I don't understand it, Thanks!