Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PaddleDetection
  • Issue
  • #575

P
PaddleDetection
  • 项目概览

PaddlePaddle / PaddleDetection
大约 2 年 前同步成功

通知 708
Star 11112
Fork 2696
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 184
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 40
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
PaddleDetection
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 184
    • Issue 184
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 40
    • 合并请求 40
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 4月 29, 2020 by saxon_zh@saxon_zhGuest

PaddleDetection模型转onnx报错

Created by: JerryDeepl

版本:

paddle2onnx 0.2
paddlepaddle-gpu 1.7.2.post107 PaddleDetection release/0.2 onnx 1.6.0(1.5.0也试过)

模型:

python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
                        --use_tb=True \
                        --tb_log_dir=tb_fruit_dir/scalar \
                        --eval
python tools/export_model.py -c configs/yolov3_mobilenet_v1_voc.yml \
        --output_dir=./inference_model \
        -o weights=output/yolov3_mobilenet_v1_voc \
           TestReader.inputs_def.image_shape=[3,320,320]

转换:

paddle2onnx --fluid_model inference_model/yolov3_mobilenet_v1_fruit  \
     --onnx_model inference_model/yolo_fruit.onnx \
     --fluid_model_name __model__ \
     --fluid_params_name __params__

报错:

-----------  Configuration Arguments -----------
check_task: image_classification
debug: False
fluid_model: inference_model/yolov3_mobilenet_v1_fruit
fluid_model_name: __model__
fluid_params_name: __params__
image_path: 
name_prefix: 
onnx_model: inference_model/yolo_fruit.onnx
return_variable: False
to_print_model: False
------------------------------------------------
load the model parameter done.
/home/codeadmin/.local/lib/python3.7/site-packages/fluid_onnx/detection_ops.py:845: UserWarning: The parameter normalized of multiclass_nms OP of Paddle is False, which has diff with ONNX.                          Please set normalized=True in multiclass_nms of Paddle
  Please set normalized=True in multiclass_nms of Paddle')
The operator sets to run test case.
{'nearest_interp', 'transpose2', 'batch_norm', 'concat', 'multiclass_nms', 'yolo_box', 'depthwise_conv2d', 'leaky_relu', 'elementwise_add', 'relu', 'conv2d'}
Traceback (most recent call last):
  File "/home/codeadmin/.local/bin/paddle2onnx", line 8, in <module>
    sys.exit(main())
  File "/home/codeadmin/.local/lib/python3.7/site-packages/fluid_onnx/fluid_to_onnx.py", line 230, in main
    convert(args)
  File "/home/codeadmin/.local/lib/python3.7/site-packages/fluid_onnx/fluid_to_onnx.py", line 194, in convert
    checker.check_model(onnx_model)
  File "/home/codeadmin/.local/lib/python3.7/site-packages/onnx/checker.py", line 86, in check_model
    C.check_model(model.SerializeToString())
onnx.onnx_cpp2py_export.checker.ValidationError: Node () has input size 0 not in range [min=1, max=1].

==> Context: Bad node spec: output: "nearest_interp_0.tmp_0@out_size_f" op_type: "Cast" attribute { name: "to" i: 1 type: INT }
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleDetection#575
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7