I trained a Resnet model in torch. Then, I converted it to caffe and to tflite. now I want to convert it to onnx. How can I do it? I try that command:
python3 -m tf2onnx.convert --tflite resnet.lite --output resnet.lite.onnx --opset 13 --verbose
because the current format of the model is tflite,
and got that error:
return packer_type.unpack_from(memoryview_type(buf), head)[0]
struct.error: unpack_from requires a buffer of at least 11202612 bytes for unpacking 4 bytes at offset 11202608 (actual buffer size is 2408448)
Thanks.
you can try something like this checkout link may be you need to freeze the model layers before starting conversion.
you can try this one also link