首页 > 其他 > 详细

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

时间:2020-01-21 21:41:08      阅读:321      评论:0      收藏:0      [点我收藏+]
$ 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 <module>
    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 <dictcomp>
    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

原文:https://www.cnblogs.com/dgwblog/p/12225767.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!