I tried this, but get the problem of pytorch and onnx working witch NCHW Tensor order, while tensorflow / tflite expects NHWC.
Has anyone been able to solve this?
I was trying to convert a vanilla mobilenet V2 model and ran into this issue as explained here on stackoverflow
My hunch is that Mobilenet V2 is too new for onnx…
Here is my Configuration:
torch 1.6.0.dev20200508 (needs pytorch-nightly to work with mobilenet V2 from torch.hub)
tensorflow-gpu 1.14.0
onnx 1.6.0
onnx-tf 1.5.0
Try https://github.com/nerox8664/pytorch2keras Then, export it to tflite. Six months ago, I managed to export it. However, I recommend you to try pytorch mobile. It’s almost as fast as tflite but completely flawless.