BBBBchan / CorrMatch

Official code for "CorrMatch: Label Propagation via Correlation Matching for Semi-Supervised Semantic Segmentation"
117 stars 8 forks source link

Question about the L_u^c (formula 9) #5

Closed Hugo-cell111 closed 1 year ago

Hugo-cell111 commented 1 year ago

Hi! In CE Loss, the prediction is usually obtained by softmax. But I haven't found any softmax function applied to pred_u_w_corr in your code, which means pred_u_w_corr is model logit not the probability. Instead, I find the softmax is applied to the correlation map. I feel it a little unusual and wonder how you decide the loss function in this way. Thanks!

BBBBchan commented 1 year ago

Hi there. In PyTorch, the Cross-EntropyLoss has a softmax function “embedded”. You can refer to the official document for details. https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html