Skip to content

Conversation

@EvgeniyS99
Copy link
Contributor

No description provided.




class WeightedBCE(nn.Module):
Copy link
Member

@AlexeyKozhevin AlexeyKozhevin Jul 11, 2023

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)
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

@EvgeniyS99 EvgeniyS99 Jul 11, 2023

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

Copy link
Member

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):
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants