SSD运行问题汇总
- 地址
- 环境配置
- train.py
-
- 1.FileNotFoundError: [Errno 2] No such file or directory
- 2.RuntimeError: randperm is only implemented for CPU
- 3.images, targets = next(batch_iterator)
- 4.RuntimeError: The shape of the mask [32, 8732] at index 0 does not match the shape of the indexed tensor [279424, 1] at index 0
- 5.RuntimeError: DataLoader worker is killed by signal: Killed
- eval.py
- 参考
地址
https://github.com/amdegroot/ssd.pytorch
环境配置
传了anaconda配置,主要是自己用。(直接去上面地址中的github地址配置就行)
https://download.youkuaiyun.com/download/Doraemon_Zzn/12614296
conda env create -f xxx.yaml
train.py
1.FileNotFoundError: [Errno 2] No such file or directory
修改路径指向自己的数据集:
针对coco数据集,修改data/coco.py第11行
COCO_ROOT = osp.join(HOME, ‘data/coco/’)
针对voc数据集,修改data/voc0712.py第28行
VOC_ROOT = osp.join(HOME, “data/VOCdevkit/”)
我改成绝对路径才成功
用的是VOC数据集,形式如下:
- VOCdevkit
- VOC2007
- VOC2012
2.RuntimeError: randperm is only implemented for CPU
torch/utils/data/sampler.py 第51行处内容如下
def _iter_(self)
cpu = torch.device(