Open Jerryzhangzhao opened 3 years ago
The model has the "densify" op which I haven't seen before. Seems to crash while trying to extract tensor data from tflite interpreter.
@TomWildenhain-Microsoft Thanks. I've convert the tflite model to saved_model format with tflite2tensorflow which support Densify op, and then convert the .pb file to onnx format.
Is there a plan to support the Densify
op in near future?
Hi @TomWildenhain-Microsoft, based on the result of my debugging, this repro code is crashed by this line. https://github.com/onnx/tensorflow-onnx/blob/a1a9343cef193ef45b7f91d511e9c7bd1dffb3e3/tf2onnx/tflite_utils.py#L200
Cause the _get_tensor_details()
function will catch the TensorSparsityParameters
of tflite interpreter. While TensorSparsityParameters
is missing in one of the tensor.
tensor_sparsity_params = self._interpreter.TensorSparsityParameters(tensor_index)
However, we don't use the tensor_sparsity_params
in details
. If I remove the above line in _get_tensor_details()
function. There will get the shape error.
cannot reshape array of size 96 into shape (16,1,1,24)
Do you have any idea about this case?
To those still looking for onnx format for mediapipe pose detection model: https://github.com/PINTO0309/PINTO_model_zoo/blob/main/053_BlazePose/download.sh
pls refer: https://github.com/PINTO0309/tflite2tensorflow/issues/18 https://github.com/PINTO0309/tflite2tensorflow/issues/11
Describe the bug I am converting a tflite model to onnx with tf2onnx, but it causecore dump. The model is pose_detection.tflite, model link
System information
pip install git+https://github.com/onnx/tensorflow-onnx
)I've also tried on windows10, with anaconda env, the same error.
To Reproduce with the command line:
python -m tf2onnx.convert --tflite ./pose_detection.tflite --output pose_detection.onnx
Screenshots If applicable, add screenshots to help explain your problem. The chinese character in above image is "Segmentation fault (core dumped)"
Additional context The model is about human detection. model link