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 wanted to try your code on SWIMSEG dataset. It has only two classes- cloud and sky (background). I got IoU of 80%. But I wanted to BCELoss instead of CrossEntropyLoss so that I could reduce the number of output channels to just 1 instead of 2. Hence, I used use BCELoss (For this, I also introduced a sigmoid layer at the end of the model). The problem is that it is now giving huge error and output tensor is quickly moving towards 0, i.e., I am getting all the outputs as 0s. I tried changing learning rates. But it was not very helpful. Any idea, what's going wrong?
The text was updated successfully, but these errors were encountered:
prk-vinay
changed the title
Very high loss one using BCELoss
Very high loss on using BCELoss
Jan 31, 2021
Sorry I don't use BCELoss very often, so I don't have a good guess what might be the cause here. From the mathematical side of things, BCELoss looks doable to me.
Sorry I don't use BCELoss very often, so I don't have a good guess what might be the cause here. From the mathematical side of things, BCELoss looks doable to me.
Thanks for your reply. Is there any other loss function that I should consider for binary classification?
Hi,
I wanted to try your code on SWIMSEG dataset. It has only two classes- cloud and sky (background). I got IoU of 80%. But I wanted to BCELoss instead of CrossEntropyLoss so that I could reduce the number of output channels to just 1 instead of 2. Hence, I used use BCELoss (For this, I also introduced a sigmoid layer at the end of the model). The problem is that it is now giving huge error and output tensor is quickly moving towards 0, i.e., I am getting all the outputs as 0s. I tried changing learning rates. But it was not very helpful. Any idea, what's going wrong?
The text was updated successfully, but these errors were encountered: