The official implementation of Equalization Loss v1 & v2 (CVPR 2020, 2021) based on MMDetection. https://arxiv.org/abs/2012.08548 https://arxiv.org/abs/2003.05176
Thanks for your error report and we appreciate it a lot.
Checklist
I have searched related issues but cannot get the expected help.
The bug has not been fixed in the latest version.
Describe the bug
A clear and concise description of what the bug is.
File "/home/lsc/桌面/mmdBox/mmdetection/mmdet/models/losses/eqlv2.py", line 68, in expand_label
target[torch.arange(self.n_i), gt_classes] = 1
IndexError: tensors used as indices must be long, byte or bool tensors
Reproduction
What command or script did you run?
I tried to use the loss function in yolox
bash tools/dist_train.sh /home/lsc/桌面/mmdBox/mmdetection/configs/yolox /yolox_s_eqlv2_8x8_300e_coco.py 1
A placeholder for the command.
2. Did you make any modifications on the code or config? Did you understand what you have modified?
3. What dataset did you use?
**Environment**
1. Please run `python mmdet/utils/collect_env.py` to collect necessary environment information and paste it here.
2. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
follow the official way of mmdetection of v2.25.2
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
- sys.platform: linux
Python: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0]
CUDA available: True
GPU 0: NVIDIA GeForce RTX 3090
CUDA_HOME: None
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.10.0
**Error traceback**
If applicable, paste the error trackback here.
A placeholder for trackback.
**Bug fix**
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug A clear and concise description of what the bug is. File "/home/lsc/桌面/mmdBox/mmdetection/mmdet/models/losses/eqlv2.py", line 68, in expand_label target[torch.arange(self.n_i), gt_classes] = 1 IndexError: tensors used as indices must be long, byte or bool tensors
Reproduction
A placeholder for the command.
A placeholder for trackback.