You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was looking into the code and found some mismatch in Inverse_Sigmoid_Loss function.
class Inverse_Sigmoid_Loss(nn.Module):
def __init__(self):
super(Inverse_Sigmoid_Loss, self).__init__()
def forward(self, prediction, target, weight=None):
trans_prediction = 1 / torch.sigmoid(target) - 1
loss = F.l1_loss(trans_prediction, target, reduction='none')
if weight is not None:
loss = loss * weight
return loss
This looks odd to me. trans_prediction is calculated from target and L1 loss is calculated between trans_prediction and target which doesn't make sense. variable prediction wasn't even used in this function. Any explanation for that ? Thanks
The text was updated successfully, but these errors were encountered:
Hi, I was looking into the code and found some mismatch in Inverse_Sigmoid_Loss function.
This looks odd to me.
trans_prediction
is calculated fromtarget
and L1 loss is calculated betweentrans_prediction
andtarget
which doesn't make sense. variableprediction
wasn't even used in this function. Any explanation for that ? ThanksThe text was updated successfully, but these errors were encountered: