-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cityscapes SOTA 模型导出报错'Config' object has no attribute 'model' #3358
Comments
@Siiiiiigma 你好,这应该是一个bug,问题在于CityscapesSOTA使用了paddleseg中的模块,而后续paddleseg更新时没有及时修改。可以尝试使用更早之前的版本,稍后我将会修复这个问题。 |
@Siiiiiigma 我已经提交了一个PR,你可以尝试克隆我的修改试试 |
@Asthestarsfalll 0 |
@Siiiiiigma |
谢谢,明白了,修改为加载之前下载的saved_model/model.pdparams之后就没有警告了 |
@Asthestarsfalll 出现了如下报错: 请问是我输入数据的形状问题吗,还是模型的问题? |
@Siiiiiigma 应该是输入数据的形状问题 |
https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.8/docs/deployment/inference/python_inference_cn.md |
看报错是模型内部concat时tensor形状不一样,使用develop分支试试呢? |
@Asthestarsfalll |
Thanks for this issue. As it has been inactive for a long time, we would close it. If you has any questions, please feel free to reopen or new issue, and we will follow up and resolve it. |
问题确认 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
是否愿意提交PR? Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: