dual focal loss
See original GitHub issueWhat is the equivalent of Adaptive class weight layer in the original article? The output of this layer should be the input of the softmax here: pred = torch.softmax(logits, dim=1)
but none treatment were made for this input.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Dual Focal Loss to address class imbalance in semantic ...
This paper has proposed a novel Dual Focal Loss (DFL) function to address the class imbalance and class weakness problems of semantic ...
Read more >Dual Focal Loss (DFL) - File Exchange - MATLAB Central
Dual Focal Loss (DFL) function [1] alleviates the class imbalance issue in classification as well as semantic segmentation.
Read more >Dual Focal Loss to address class imbalance in semantic ...
Focal Loss has proven to be effective at loss balancing by ... In this paper, a novel Dual Focal Loss (DFL) function is...
Read more >Dual Focal Loss to address class imbalance in semantic ...
This article explores the plethora of traditional machine learning approaches aiming to mitigate the adversarial effects of class imbalance ...
Read more >[1909.11932] Adaptive Class Weight based Dual Focal Loss ...
In this paper, we propose a Dual Focal Loss (DFL) function, as a replacement for the standard cross entropy (CE) function to achieve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have just thought of that, if I have not misunderstood what ACW does, it seems that when the logits output of the model is a [N, M] tensor(N samples and each sample has M output values as logits of each class), ACW provides a weight vector of shape [1, M] that should be multiplied into the logits of each sample as the learned remedy for the knowledge learned from the unbalanced dataset. For each row of the [N, M] logits tensor, the weight vector is multiplied to it elementwisely, which I thought should be similar behavior of depthwise convolutions. For example, your model structure might be like this:
This
nn.Conv2d
with groups as same as input channels should act similarly as the acw layer.Hi, I have no idea if you are still interested in implementing acw layer, but I have just thought that maybe you can use a 1x1 depth-wise convolution layer following the logits, which should work in the same way as the acw layer.