Hi!
I’m recycling old motherboards that need to use tensorflow version 1.5.
When I use tflite, it gives an error.
Thanks for any help.
import tensorflow as tf
interpreter = tf.lite.Interpreter(model_path='model.tflite') # ERROR
Error:
interpreter = tf.lite.Interpreter(model_path=‘model.tflite’)
AttributeError: module ‘tensorflow’ has no attribute ‘lite’
lgusm
January 19, 2022, 11:34am
3
Maybe the lite object wasn’t available on that version of TF.
Can you try using at least 1.15?
pip3 uninstall tensorflow
pip3 install tensorflow==1.15
Successfully installed gast-0.2.2 keras-applications-1.0.8 tensorboard-1.15.0 tensorflow-1.15.0 tensorflow-estimator-1.15.1
On Python 3.6.9:
import tensorflow as tf
Illegal instruction
lgusm
January 19, 2022, 12:43pm
8
Python should be at least 3.7
It’s crazy!
There is an error on translate english-portuguese:
I’ll try with Python 3.9
Thank you!
Testing on Python 3.7:
Python 3.7.5 (default, Dec 9 2021, 17:04:37)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import tensorflow
Illegal instruction
lgusm
January 19, 2022, 2:09pm
11
Thanks for pointing that out!
lgusm
January 19, 2022, 2:16pm
12
regarding the illegal instruction, I think your CPU (that you mentioned is old) might not have support for AVX. That would explain why it worked on TF 1.5 and not 1.15!
the solution would be to compile TF from source.
more information here: Illegal instruction (core dumped) after running import tensorflow · Issue #17411 · tensorflow/tensorflow · GitHub
(last comment @mihaimaruseac to more precise)
2 Likes