weixin_39607935
weixin_39607935
2020-12-08 21:58

convert weights to onnx error!

Hi, first of all, thanks for your great work and share the code. When I try to run "yolov3_to_onnx.py", in the beginning, it told me "Layer of type yolo not supported, skipping ONNX node generation Layer of type yolo not supported, skipping ONNX node generation Layer of type yolo not supported, skipping ONNX node generation graph YOLOv3-608(%000_net[FLOAT, 64x3x608x608])......" when the script go into the end, it told me"check_model(model.SerializeToString() onnx.onnx_cpp2py_export.checker.ValidationError: Node (086_upsample) has input size 1 not in range [min=2, max=2]."

have you ever meet this issue?

该提问来源于开源项目:Cw-zero/TensorRT_yolo3

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39576127 weixin_39576127 5月前

    Firstly, TensorRT do not support “yolo” layer, so the code defines the supported_layers on line 629, which no "yolo", you can confirm it. Secondly, version may also cause errors. I was running on python2.7 If you still can not solve, please tell me. I will test my code on different computer.

    点赞 评论 复制链接分享
  • weixin_39607935 weixin_39607935 5月前

    -zero Thanks for your rapidly response. I use python2.7, test the code on TX2. Could you give me the pip requirements? Below is my environment:

    nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Sun_Nov_19_03:16:56_CST_2017 Cuda compilation tools, release 9.0, V9.0.252

    onnx 1.41 protobuf 3.7.0

    点赞 评论 复制链接分享
  • weixin_39774219 weixin_39774219 5月前

    -zero -li Has this problem been solved? I also encountered the same problem,when running the code with the cfg file and weights file provided by Cw-zero,under the environment of python2.7,cuda-10,tensorrt5 and 2080ti

    C.check_model(model.SerializeToString()) onnx.onnx_cpp2py_export.checker.ValidationError: Node (086_upsample) has input size 1 not in range [min=2, max=2].

    ==> Context: Bad node spec: input: "085_convolutional_lrelu" output: "086_upsample" name: "086_upsample" op_type: "Upsample" attribute { name: "mode" s: "nearest" type: STRING } attribute { name: "scales" floats: 1 floats: 1 floats: 2 floats: 2 type: FLOATS }

    点赞 评论 复制链接分享
  • weixin_39576127 weixin_39576127 5月前

    -zero Thanks for your rapidly response. I use python2.7, test the code on TX2. Could you give me the pip requirements? Below is my environment:

    nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Sun_Nov_19_03:16:56_CST_2017 Cuda compilation tools, release 9.0, V9.0.252

    onnx 1.41 protobuf 3.7.0

    emmm...Sorry that I cannot remember all requirements. You can run the code firstly, then you can know your missing library, finally use pip install.

    点赞 评论 复制链接分享

相关推荐