Closed gg22mm closed 1 year ago
这个是因为安装的paddleseg版本和运行的不一致,建议下载并重新安装paddleseg develop,并使用tools目录下的export.py。安装指南如下:https://github.com/PaddlePaddle/PaddleSeg/blob/develop/docs/install_cn.md#22-%E5%AE%89%E8%A3%85paddleseg
develop 不是开发版吗?
现在也比较稳定,可以直接用
好的谢谢,回头再试~~~
问题确认 Search before asking
Bug描述 Describe the Bug
1、按文档 python tools/export.py 直接报错 (paddleGpu) D:\dzkj\PaddleSeg27>python tools/export.py --config configs/quick_start/pp_liteseg_optic_disc_512x512_1k_wll.yml --model_path output/best_model/model.pdparams --save_dir output/infer_model Traceback (most recent call last): File "tools/export.py", line 140, in
main(args)
File "tools/export.py", line 83, in main
cfg.check_sync_info()
AttributeError: 'Config' object has no attribute 'check_sync_info'
2、看到根目录也有个export.py 试了一下很多警告如:
(paddleGpu) D:\dzkj\PaddleSeg27>python export.py --config configs/quick_start/pp_liteseg_optic_disc_512x512_1k_wll.yml --model_path output/best_model/model.pdparams --save_dir output/infer_model W0315 16:25:48.210386 2076 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 3.7, Driver API Version: 10.2, Runtime API Version: 10.2 W0315 16:25:48.226009 2076 gpu_resources.cc:91] device: 0, cuDNN Version: 7.6. 2023-03-15 16:25:50 [INFO] Loading pretrained model from https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet2.tar.gz 2023-03-15 16:25:50 [INFO] There are 265/265 variables loaded into STDCNet. 2023-03-15 16:25:51 [INFO] Loaded trained params of model successfully. C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmp764y1p8d.py:26 The behavior of expression A + B has been unified with elementwise_add(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_add(X, Y, axis=0) instead of A + B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmph0q8xt42.py:16 The behavior of expression A B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmph0q8xt42.py:16 The behavior of expression A - B has been unified with elementwise_sub(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_sub(X, Y, axis=0) instead of A - B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmph0q8xt42.py:16 The behavior of expression A + B has been unified with elementwise_add(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_add(X, Y, axis=0) instead of A + B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpaa8aj7ns.py:16 The behavior of expression A B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpaa8aj7ns.py:16 The behavior of expression A - B has been unified with elementwise_sub(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_sub(X, Y, axis=0) instead of A - B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpaa8aj7ns.py:16 The behavior of expression A + B has been unified with elementwise_add(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_add(X, Y, axis=0) instead of A + B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpleikhj55.py:16 The behavior of expression A B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpleikhj55.py:16 The behavior of expression A - B has been unified with elementwise_sub(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_sub(X, Y, axis=0) instead of A - B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) C:\ProgramData\Anaconda3\envs\paddleGpu\lib\site-packages\paddle\fluid\layers\math_op_patch.py:341: UserWarning: C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpleikhj55.py:16 The behavior of expression A + B has been unified with elementwise_add(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_add(X, Y, axis=0) instead of A + B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) 2023-03-15 16:26:00 [INFO] The inference model is saved in output/infer_model 2023-03-15 16:26:00 [WARNING] This
export.py
will be removed in version 2.8, please usetools/export.py
.复现环境 Environment
------------Environment Information------------- platform: Windows-10-10.0.17763-SP0 Python: 3.7.13 (default, Mar 28 2022, 08:03:21) [MSC v.1916 64 bit (AMD64)] Paddle compiled with cuda: True NVCC: Not Available cudnn: 7.6 GPUs used: 1 CUDA_VISIBLE_DEVICES: None GPU: ['GPU 0: Tesla K80', 'GPU 1: Tesla K80'] PaddleSeg: 2.7.0 PaddlePaddle: 2.3.1 OpenCV: 4.4.0
Bug描述确认 Bug description confirmation
是否愿意提交PR? Are you willing to submit a PR?