smellslikeml / ActionAI

Real-Time Spatio-Temporally Localized Activity Detection by Tracking Body Keypoints
https://www.hackster.io/actionai/actionai-custom-tracking-multiperson-activity-recognition-fa5cb5
GNU General Public License v3.0
772 stars 193 forks source link

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

Open japita-se opened 5 years ago

japita-se commented 5 years ago

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'

gohjiayi commented 4 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).