혹시 저와 같은 환경에 같은 오류를 만나실 분들을 위해 글을 남깁니다.
cuda 11.3
torch v1.11
nvidia rtx 2060 vram 6GB
1) device 못찾는 error
sol)
from mmdet.utils import get_device
cfg.device = get_device()
2) Broken pipe Error
sol)
cfg.data.workers_per_gpu= 0
3) RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and int for the source.
sol)
data_anno = {
'bboxes': np.array(gt_bboxes, dtype=np.float32).reshape(-1, 4),
'labels': np.array(gt_labels, dtype=np.int64),
'bboxes_ignore': np.array(gt_bboxes_ignore, dtype=np.float32).reshape(-1, 4),
'labels_ignore': np.array(gt_labels_ignore, dtype=np.int64)
}
4) RuntimeError: CUDA out of memory
sol)
cfg.data.samples_per_gpu = 1