Open SHMathRabbit opened 4 years ago
I am not the author itself but I think I can answer some of your questions. There are certainly some issues in exporting the network to ONNX even with op-level 11 at least with Pytorch version 1.3 I have not tried with 1.4 yet. But the ONNX model exported is pretty much unusable even though it loads & runs, it produces no output and the problem seem to be in some of the later processing layers of the network that create the final prediction outputs they seem to be not really exportable as they use functionality that can not be probably traced by the PyTorch JIT. So you probably would have to modify the network structure to take this post-processing bit out of the network itself and just output the last layer of the feature extraction before and then try reexporting and move the post-processing inside the code executing your ONNX model.
@toandaominh1997 Hi, thanks for your Great work. I have tried to convert efficientdet-b0.pth to onnx model, and my code is follow :
I can get efficientdet.onnx file when I run the above code. Moreover I use onnx.checker.check_model to check the onnx model and no error.
But when I use the same image to run demo.py and onnx_test.py, demo.py has result(can predict object) , and onnx_test.py is not. my onnx_test.py is follow:
when run onnx_test.py, output :
Can i reduce the model file size?
Please take the time to answer the above three questions, thank you very much!