Open japita-se opened 5 years ago
I encountered this as well and was able to run it by removing contrib. Instead of self.interpreter = tf.contrib.lite.Interpreter(model_path=self.model_path)
I have self.interpreter = tf.lite.Interpreter(model_path=self.model_path)
.
On a fresh install:
python3 demo.py Using TensorFlow backend. WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:
Traceback (most recent call last): File "demo.py", line 124, in
mC = motionClassifier()
File "demo.py", line 19, in init self.interpreter = tf.contrib.lite.Interpreter(model_path=self.model_path) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/util/lazy_loader.py", line 63, in getattr return getattr(module, item) File "/usr/local/lib/python3.7/dist-packages/tensorflow/init.py", line 51, in getattr return getattr(module, item) AttributeError: module 'tensorflow_core.contrib' has no attribute 'lite'