-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
giou #1842
Comments
Please follow the |
iou_loss.py ###import torch from mmdet.core import bbox_overlaps @weighted_loss
@weighted_loss
@LOSSES.register_module
@LOSSES.register_module
@weighted_loss
@weighted_loss
@LOSSES.register_module
if name is "main": |
result: |
* Removing defaults channel * openmp * cuda * cuda * cuda * sphinx
I modified iou_loss.py
### ### ### ### ### ### ### ### ### ### ### ### ###
@weighted_loss
def giou_bbox_overlaps(bboxes1, bboxes2,mode='iou', is_aligned=False):
'''Calculate generative overlap between two set of bboxes.
@weighted_loss
def giou_loss(pred, target, eps=1e-6):
"""IoU loss.
@LOSSES.register_module
class GIoULoss(nn.Module):
### ### ### ### ### ### ###
I use #loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))), It can work . But I get a error when I use GioULoss.
****
result:
box: 0.0170, loss_cls: 0.0432, acc: 99.3516, loss_bbox: 0.0207, loss: 0.1334
2019-12-20 21:54:13,546 - INFO - Epoch [1][550/5405] lr: 0.00100, eta: 0:56:04, time: 0.128, data_time: 0.001, memory: 1259, loss_rpn_cls: 0.0358, loss_rpn_bbox: 0.0216, loss_cls: 0.0631, acc: 98.8945, loss_bbox: 0.0410, loss: 0.1615
2019-12-20 21:54:19,938 - INFO - Epoch [1][600/5405] lr: 0.00100, eta: 0:56:00, time: 0.128, data_time: 0.001, memory: 1259, loss_rpn_cls: 0.0416, loss_rpn_bbox: 0.0158, loss_cls: 0.0405, acc: 99.4062, loss_bbox: 0.0197, loss: 0.1176
/opt/conda/conda-bld/pytorch_1573049310284/work/aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda ->auto::operator()(int)->auto: block: [1,0,0], thread: [0,0,0] Assertion
index >= -sizes[i] && index < sizes[i] && "index out of bounds"
failed./opt/conda/conda-bld/pytorch_1573049310284/work/aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda ->auto::operator()(int)->auto: block: [1,0,0], thread: [1,0,0] Assertion
index >= -sizes[i] && index < sizes[i] && "index out of bounds"
failed./opt/conda/conda-bld/pytorch_1573049310284/work/aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda ->auto::operator()(int)->auto: block: [1,0,0], thread: [2,0,0] Assertion
index >= -sizes[i] && index < sizes[i] && "index out of bounds"
failed./opt/conda/conda-bld/pytorch_1573049310284/work/aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda ->auto::operator()(int)->auto: block: [1,0,0], thread: [3,0,0] Assertion
index >= -sizes[i] && index < sizes[i] && "index out of bounds"
failed.return self.forward_train(img, img_meta, **kwargs)
File "/home/zhangyanan/Desktop/钢材表面/mmdetection/mmdet/models/detectors/two_stage.py", line 199, in forward_train
gt_labels[i])
File "/home/zhangyanan/Desktop/钢材表面/mmdetection/mmdet/core/bbox/assigners/max_iou_assigner.py", line 90, in assign
assign_result = self.assign_wrt_overlaps(overlaps, gt_labels)
File "/home/zhangyanan/Desktop/钢材表面/mmdetection/mmdet/core/bbox/assigners/max_iou_assigner.py", line 124, in assign_wrt_overlaps
& (max_overlaps < self.neg_iou_thr)] = 0
RuntimeError: copy_if failed to synchronize: device-side assert triggered
terminate called after throwing an instance of 'c10::Error'
what(): CUDA error: device-side assert triggered (insert_events at /opt/conda/conda-bld/pytorch_1573049310284/work/c10/cuda/CUDACachingAllocator.cpp:569)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7fdc29885687 in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: + 0x17044 (0x7fdc29ac1044 in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libc10_cuda.so)
frame #2: + 0x1cccb (0x7fdc29ac6ccb in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libc10_cuda.so)
frame #3: c10::TensorImpl::release_resources() + 0x4d (0x7fdc29872e9d in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #4: + 0x1c8519 (0x7fdc59598519 in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #5: + 0x4b1b9b (0x7fdc59881b9b in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #6: + 0x4b1bd6 (0x7fdc59881bd6 in /home/zhangyanan/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #26: __libc_start_main + 0xf0 (0x7fdc68f86830 in /lib/x86_64-linux-gnu/libc.so.6)
The text was updated successfully, but these errors were encountered: