-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added weighted BCE #705
base: master
Are you sure you want to change the base?
Added weighted BCE #705
Conversation
|
||
|
||
|
||
class WeightedBCE(nn.Module): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think that weighted bce means that I can throw weights into it. It's rather BalancedWeightedBCE
|
||
losses = [WeightedBCE(), Dice()] | ||
weights = [.5, .5] | ||
comboloss = Weighted(losses, weights) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need it here? There is not a problem to make it in your notebook:
ComboLoss = Weighted([WeightedBCE(), Dice()], [.5, .5])
Nevertheless, comboloss
here is inappropriate naming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, ye, but I thought I should present the full loss used in my models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need it here? There is not a problem to make it in your notebook:
ComboLoss = Weighted([WeightedBCE(), Dice()], [.5, .5])
Nevertheless,
comboloss
here is inappropriate naming.
Why is comboloss
inappropriate naming? The bce loss is combined with dice loss --> comboloss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unclear combination of what
|
||
|
||
|
||
class BalancedWeightedBCE(nn.Module): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CrossEntropyLoss
from batchflow.models.torch.losses.core.py
already can do all of that. Maybe, make inherit BCE / make it a special case of it somehow?
No description provided.