Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a error when I loading the movenat_thunder.tflite model #29

Open
biu-biu-002 opened this issue Oct 8, 2023 · 0 comments
Open

Have a error when I loading the movenat_thunder.tflite model #29

biu-biu-002 opened this issue Oct 8, 2023 · 0 comments

Comments

@biu-biu-002
Copy link

Hi,
I tried loading the movenat_thunder.tflite model with tf.lite.interpreter, using the following code:

import tensorflow as tf
interpreter = tf.lite.Interpreter(model_path='movenat_thunder.tflite')

But was hit with the following error:

ValueError Traceback (most recent call last)
/home/generate_cc_array.ipynb Cell 5 in <cell line: 1>()
----> 1 interpreter = tf.lite.Interpreter(model_path='movenat_thunder.tflite')
2 interpreter.allocate_tensors()
4 input_details = interpreter.get_input_details()[0]

File ~/virtual_environments/utkface/lib/python3.10/site-packages/tensorflow/lite/python/interpreter.py:455, in Interpreter.init(self, model_path, model_content, experimental_delegates, num_threads, experimental_op_resolver_type, experimental_preserve_all_tensors)
448 custom_op_registerers_by_name = [
449 x for x in self._custom_op_registerers if isinstance(x, str)
450 ]
451 custom_op_registerers_by_func = [
452 x for x in self._custom_op_registerers if not isinstance(x, str)
453 ]
454 self._interpreter = (
--> 455 _interpreter_wrapper.CreateWrapperFromFile(
456 model_path, op_resolver_id, custom_op_registerers_by_name,
457 custom_op_registerers_by_func, experimental_preserve_all_tensors))
458 if not self._interpreter:
459 raise ValueError('Failed to open {}'.format(model_path))

ValueError: quantized_dimension must be in range [0, 1). Was 3.Tensor 33 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 36 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 40 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 44 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 48 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 52 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 56 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 60 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 64 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 68 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 72 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 76 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 80 has invalid quantization parameters.quantized_dimension must be in range [0, 1). Was 3.Tensor 84 has invalid quantization parameters.

Tensorflow version : 2.9.1
Python version: 3.10.4

How to solve this issue? Please guide

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant