当前位置 : 主页 > 编程语言 > python >

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

来源:互联网 收集:自由互联 发布时间:2022-08-10
$ 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,
$ 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:



上一篇:Python中不为人知的四个特性
下一篇:没有了
网友评论