KeyError: 'module_list.85.Conv2d.weight' #657

$ python train.py --data data/coco.data --cfg cfg/yolov3.cfg
Namespace(accumulate=2, adam=False, arc='default', batch_size=32, bucket='', cache_images=False, cfg='cfg/yolov3.cfg', data='data/coco.data', device='', epochs=273, evolve=False, img_size=416, img_weights=False, multi_scale=False, name='', nosave=False, notest=False, prebias=False, rect=False, resume=False, transfer=False, var=None, weights='weights/ultralytics49.pt')
Using CUDA device0 _CudaDeviceProperties(name='GeForce GTX 1070', total_memory=8116MB)

Traceback (most recent call last):
  File "train.py", line 444, in 
    train()  # train normally
  File "train.py", line 111, in train
    chkpt['model'] = {k: v for k, v in chkpt['model'].items() if model.state_dict()[k].numel() == v.numel()}
  File "train.py", line 111, in 
    chkpt['model'] = {k: v for k, v in chkpt['model'].items() if model.state_dict()[k].numel() == v.numel()}
KeyError: 'module_list.85.Conv2d.weight'
(base)


在新版本的yolov3 中需要手动指定 –weight 权重

python train.py --data data/rbc.data --weights weights/yolov3-tiny.pt --cfg cfg/yolov3-tiny.cfg --epoch 1

给出 下载地址

https://drive.google.com/drive/folders/1LezFG5g3BCW6iYaV89B2i64cqEUZD7e0


KeyError: 'module_list.85.Conv2d.weight' #657_第1张图片

你可能感兴趣的:(KeyError: 'module_list.85.Conv2d.weight' #657)