Skip to content

Cityscapes SOTA 模型导出报错'Config' object has no attribute 'model' #3358

@Siiiiiigma

Description

@Siiiiiigma

问题确认 Search before asking

Bug描述 Describe the Bug

python export.py --config configs/mscale_ocr_cityscapes_autolabel_mapillary.yml --save_dir ./output --input_shape 1 3 2048 1024
按照readme要求在制定位置下载了模型参数和预训练参数,使用以上命令导出预训练的模型网络时,出现以下报错
尝试了历史issue中提到的几种方法,例如通过源码安装开发版paddleseg,问题仍然存在
利用飞浆ai studio的notebook也同样存在此问题,和配置环境应该无关

报错内容
d:\deeplearning\paddleseg\paddleseg\cvlibs\manager.py:113: UserWarning: MscaleOCRNet exists already! It is now updated to <class 'models.mscale_ocrnet.MscaleOCRNet'> !!!
warnings.warn("{} exists already! It is now updated to {} !!!".
Traceback (most recent call last):
File "D:\DeepLearning\PaddleSeg\contrib\CityscapesSOTA\export.py", line 140, in
main(args)
File "D:\DeepLearning\PaddleSeg\contrib\CityscapesSOTA\export.py", line 84, in main
net = cfg.model
AttributeError: 'Config' object has no attribute 'model'

复现环境 Environment

paddlepaddle-gpu 2.4.2.post117
paddleseg 2.8.0 d:\deeplearning\paddleseg

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

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

  • 我愿意提交PR!I'd like to help by submitting a PR!

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions