PaddlePaddle / PaddleYOLO

🚀🚀🚀 YOLO series of PaddlePaddle implementation, PP-YOLOE+, RT-DETR, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOv10, YOLOX, YOLOv5u, YOLOv7u, YOLOv6Lite, RTMDet and so on. 🚀🚀🚀
https://github.com/PaddlePaddle/PaddleYOLO
GNU General Public License v3.0
554 stars 133 forks source link

参考本仓库configs/yolov8的readme,无法导出模型 #137

Closed Yi-sir closed 1 year ago

Yi-sir commented 1 year ago

问题确认 Search before asking

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

参考yolov8 readme中的命令【python tools/export_model.py -c configs/yolov8/yolov8_s_500e_coco.yml -o weights=https://paddledet.bj.bcebos.com/models/yolov8_s_500e_coco.pdparams】 尝试导出模型。 报错信息:

Traceback (most recent call last):
  File "tools/export_model.py", line 110, in <module>
    main()
  File "tools/export_model.py", line 106, in main
    run(FLAGS, cfg)
  File "tools/export_model.py", line 64, in run
    trainer = Trainer(cfg, mode='test')
  File "/root/projects/PaddleYOLO/ppdet/engine/trainer.py", line 96, in __init__
    self.model.yolo_head._initialize_biases()  # Note: must added
  File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/dygraph/layers.py", line 1144, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'YOLOv8Head' object has no attribute '_initialize_biases'

复现环境 Environment

Bug描述确认 Bug description confirmation

是否愿意提交PR? Are you willing to submit a PR?

nemonameless commented 1 year ago

已修复