Open ysysys666 opened 8 months ago
I'm also having trouble encountering the same Issue.
Similar problems happen when use AmpOptimizer
in DETR
:
File "/home/louis/miniconda3/envs/mmengine/lib/python3.8/site-packages/mmdet/models/dense_heads/detr_head.py", line 437, in _get_targets_single
bbox_targets[pos_inds] = pos_gt_bboxes_targets
RuntimeError: Index put requires the source and destination dtypes match, got Half for the destination and Float for the source.
Got same issues, have you solve it?
got same issue
Got same issues, have you solve it?
Similar problems happen when use AmpOptimizerWarpper in DETR
if anyone solve this problem?
Notice
There are several common situations in the reimplementation issues as below
Checklist
Describe the issue
Excuese me ,does CO-DETR support AMP training? When I use AMP reimplement Co-DETR, meet the problem " RuntimeError: Index put requires the source and destination dtypes match, got Half for the destination and Float for the source". After I add a type conversion. I meet the other problem "matched_row_inds, matched_col_inds = linear_sum_assignment(cost) ValueError: matrix contains invalid numeric entries" .
Reproduction
No
COCO
Environment
python mmdet/utils/collect_env.py
to collect necessary environment information and paste it here. sys.platform: linux Python: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0] CUDA available: True numpy_random_seed: 2147483648 GPU 0,1,2,3: NVIDIA GeForce RTX 3090 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 11.4, V11.4.48 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.12.1 PyTorch compiling details: PyTorch built with:TorchVision: 0.13.1 OpenCV: 4.8.1 MMEngine: 0.10.1 MMDetection: 3.2.0+fe3f809
$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)Results
If applicable, paste the related results here, e.g., what you expect and what you get.
Issue 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!