Can it be applied to multi-classification problems?
for multi-classification, when p = softmax(x), Does GHMC_loss work?
If applied on softmax cross entropy loss, the form needs modification. We haven't studied this yet. And if you have any good idea, welcome to discuss in mail. :)
If applied on softmax cross entropy loss, the form needs modification. We haven't studied this yet. And if you have any good idea, welcome to discuss in mail. :) Thanks for your quick reply. I know less about single-stage detector, but I meet similar issues when training text sequence task in NLP.
GD(g) = R ind(g) M code: weights[inds] = tot / num_in_bin where M?
@xialuxi hello, M is the "n" in https://github.com/libuyu/GHM_Detection/blob/0b3917d95870382b1e01c9917e042a93436c5e32/mmdetection/mmdet/core/loss/ghm_loss.py#L41 and https://github.com/libuyu/GHM_Detection/blob/0b3917d95870382b1e01c9917e042a93436c5e32/mmdetection/mmdet/core/loss/ghm_loss.py#L54 Sorry for the different notation.
Thank you for your explanation.
momentum = 1.0
There will be problems with code calculation.
Since the equation has the form sum[i+1] = mmt * sum[i] + (1 - mmt) * num[i], momentum should have the range [0, 1). So if momentum = 1.0, the moving average will never be updated and is unresonable.
I will add a line to check if the value of momentum is valid. Thank you.
@xialuxi If you have more questions unrelated to "multi-classification", you'd better open a new issue :)
ok
@xialuxi hello, M is the "n" in
GHM_Detection/mmdetection/mmdet/core/loss/ghm_loss.py
Line 41 in 0b3917d
n = 0 # n valid bins
and GHM_Detection/mmdetection/mmdet/core/loss/ghm_loss.py
Line 54 in 0b3917d
weights = weights / n
Sorry for the different notation.
why the n is not a fixed value, since the bins (or M) is fixed