Skip to content
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

RuntimeError: CUDA error: device-side assert triggered #22

Open
LOVECCBACK opened this issue May 12, 2023 · 4 comments
Open

RuntimeError: CUDA error: device-side assert triggered #22

LOVECCBACK opened this issue May 12, 2023 · 4 comments

Comments

@LOVECCBACK
Copy link

你好!我出现了如题目中的问题,我的版本是CUDA=11.1 , pytoch=1.8.1,python=3.7,
我使用的是自己的数据集,只有一个类别,然后我按照detectron2 中的注册数据集进行了注册,并且能够在detectron2中运行,但是在这里面运行会出现上面这个错误,请问有什么办法吗

@shesnow
Copy link

shesnow commented Dec 15, 2023

你好,我也遇到了这个问题,请问你解决了吗?

@NokiAries
Copy link

+1+1请问有好的解决办法吗

@NokiAries
Copy link

Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.我的具体错误是索引超出了张量的有效范围,请问这块具体是哪个位置出错了

@124578-chj
Copy link

124578-chj commented Dec 9, 2024

label.fill_(-1)
pos_idx, neg_idx = subsample_labels(
label, self.batch_size_per_image, self.positive_fraction, 0
)
label.scatter_(0, pos_idx, 1)
label.scatter_(0, neg_idx, 0)
return label

修改代码如上
/home/lcq/anaconda3/envs/opendet2022/lib/python3.8/site-packages/detectron2/modeling/proposal_generator/rpn.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants