onnx模型转换为paddle模型,报错,请求看一下
Created by: baigang666
Traceback (most recent call last): File "d:\anaconda3\envs\baidupaddle_env\lib\site-packages\x2paddle\core\op_mapper.py", line 123, in save_inference_model inputs, outputs = model.x2paddle_net() File "output\model_with_code\model.py", line 706, in x2paddle_net x2paddle_774 = InstanceNormalization_layer([x2paddle_772, x2paddle_backbone_4_0_bn1_IN_weight, x2paddle_backbone_4_0_bn1_IN_bias], name='x2paddle_774') File "output\model_with_code\model.py", line 9, in InstanceNormalization_layer mean = fluid.layers.reduce_mean(input_, dim=[2, 3], keep_dim=True) File "d:\anaconda3\envs\baidupaddle_env\lib\site-packages\paddle\fluid\layers\nn.py", line 5737, in reduce_mean input, 'input', ['float32', 'float64', 'int32', 'int64'], 'reduce_mean') File "d:\anaconda3\envs\baidupaddle_env\lib\site-packages\paddle\fluid\data_feeder.py", line 80, in check_variable_and_dtype extra_message) File "d:\anaconda3\envs\baidupaddle_env\lib\site-packages\paddle\fluid\data_feeder.py", line 97, in check_type (input_name, op_name, expected_type, type(input), extra_message)) TypeError: The type of 'input' in reduce_mean must be (<class 'paddle.fluid.framework.Variable'>, <class 'paddle.fluid.core_avx.VarBase'>), but received <class 'list'>. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\JetBrains\PyCharm Community Edition 2020.1\plugins\python-ce\helpers\pydev\pydevd.py", line 1438, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "D:\JetBrains\PyCharm Community Edition 2020.1\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "G:/BAIDU_Paddle/Paddle_0.3-0518/models-release-1.8/PaddleCV/SELF_LOOKFFOR_DEMO/Pytorch2paddle/onnx2paddle/onnx2paddle_main.py", line 272, in main() File "G:/BAIDU_Paddle/Paddle_0.3-0518/models-release-1.8/PaddleCV/SELF_LOOKFFOR_DEMO/Pytorch2paddle/onnx2paddle/onnx2paddle_main.py", line 262, in main onnx2paddle(args.model, args.save_dir, params_merge) File "G:/BAIDU_Paddle/Paddle_0.3-0518/models-release-1.8/PaddleCV/SELF_LOOKFFOR_DEMO/Pytorch2paddle/onnx2paddle/onnx2paddle_main.py", line 184, in onnx2paddle mapper.save_inference_model(save_dir, params_merge) File "d:\anaconda3\envs\baidupaddle_env\lib\site-packages\x2paddle\core\op_mapper.py", line 160, in save_inference_model .format(py_code_dir)) Exception: Paddle code was saved in output\model_with_code/model.py, but seems there's wrong exist, please check model.py manually.
请大神帮忙看一下 如何解决?谢谢