TencentYoutuResearch / Classification-SemiCLS

Code for CVPR 2022 paper “Class-Aware Contrastive Semi-Supervised Learning”
Other
93 stars 13 forks source link

The implementation of soft_supconloss may be inconsistent with equation (8) in the published version #7

Closed Ming-er closed 2 years ago

Ming-er commented 2 years ago

Thanks for sharing such a brilliant work. However, I am confused by the implementation of supconloss. In your paper, Equation (8) performs the foreground re-weighting multiplication (using w_{ij}) inside the log operation. However, in soft_supconloss.py, the re-weighting factor 'mask' is multiplied with 'log_prob' in line 103, and the later ('log_prob') is the results of 'z_i zp / \tau' in practice, which means that w{ij} is excluded outside the log operation.

KaiWU5 commented 2 years ago

Sorry about the clerical error in equation (8). The w_ij should be outside of "log" for re-weighting purposes, and inside may incur nan loss when w_ij = 0. We will quickly straighten that out on Arxiv. image

Feel free to talk more details about our paper or further directions. Thank you.