murdockhou / Yet-Another-EfficientDet-Pytorch-Convert-ONNX-TVM

GNU Lesser General Public License v3.0
59 stars 17 forks source link

Constant folding not applied when converting efficientdet-d4 #13

Closed re-burn closed 2 years ago

re-burn commented 2 years ago

When I attempt to convert my efficientdet-d4 pth weight to onnx, the warning following occured: Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. It seems that Constant folding is not suported for opset >=10. However, when I tried opset 9 afterwards, anothor error occured: RuntimeError: Unsupported: ONNX export of Pad in opset 9. The sizes of the padding must be constant. Please try opset version 11. What should I do ?

azuryl commented 2 years ago

@ex-port did you solve it?

re-burn commented 2 years ago

yes! I once thought the only difference between this repository and zylo's one is that it just added a "convert" folder with two convert scripts, so I just copied the two scripts into zylo's repository and run it, that's why the warning occurred... In fact, all the codes in this repository has been rewritten to make it support onnx, so you should copy your pth file into this repository, and run the script here instead.

azuryl commented 2 years ago

@ex-port thanks your suggestion. excuse me can you convert the the onnx model to tensorrt model