GHM_Detection icon indicating copy to clipboard operation
GHM_Detection copied to clipboard

Is there a error in function `_expand_onehot_labels`?

Open shexuan opened this issue 5 years ago • 0 comments

Some code in function _expand_onehot_labels of https://github.com/open-mmlab/mmdetection/blob/master/mmdet/models/losses/ghm_loss.py is

if inds.numel() > 0:
       bin_labels[inds, labels[inds]] = 1

but in you rep function, it is:

    if inds.numel() > 0:
        bin_labels[inds, labels[inds] - 1] = 1

Is there something wrong?

shexuan avatar Jul 31 '20 16:07 shexuan