smellslikeml / ActionAI

Real-Time Spatio-Temporally Localized Activity Detection by Tracking Body Keypoints

Home Page:https://www.hackster.io/actionai/actionai-custom-tracking-multiperson-activity-recognition-fa5cb5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: module 'tensorflow_core.contrib' has no attribute 'lite'

japita-se opened this issue · comments

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'

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).