Error in pytorch training maskrcnn custom data set

问题描述:
RuntimeError: copy_if failed to synchronize: device-side assert triggered

This problem is encountered when I use MaskRcnn for instance segmentation. The target I want to detect has 5 categories, so I wrote 5 in the num_classes parameter in data/config.py. After searching in many ways, I found one that I didn’t notice. For the details, the category should be 5+1, and that 1 should be the background.

Another reason is that the label number does not start from 0.

Mine met both.

Guess you like

Origin blog.csdn.net/phker/article/details/109576341
Recommended