luuuyi / RefineDet.PyTorch

A higher performance PyTorch implementation of Single-Shot Refinement Neural Network for Object Detection
MIT License
235 stars 64 forks source link

RuntimeError: copy_if failed to synchronize: device-side assert triggere #43

Open choubin opened 4 years ago

choubin commented 4 years ago

出现错误:loss_c[pos.view(-1,1)] = 0 # filter out pos boxes for now RuntimeError: copy_if failed to synchronize: device-side assert triggered

我的实际类别是1,设置了config中'num_classes': 2,但是还是出现这个问题,设置num_classes为3却可以正常训练!请问怎么解决?

NOBUGW commented 3 years ago

你解决了吗

cenchaojun commented 3 years ago

真的一模一样呢,我也是这样的,设置2就是不行,但是设置3居然就可以运行,都不知道是为啥

lzk901372 commented 3 years ago

当你不用GPU训练的时候,这个错误会提示你下标越界。解决下标越界的问题可以参考 #45