WaqasSultani / AnomalyDetectionCVPR2018

503 stars 185 forks source link

Test_Anomaly_Detector_public.py error due to tensorflow version #77

Open WurmD opened 4 years ago

WurmD commented 4 years ago

$ pip3 list Keras 1.1.0 tensorflow==2.3.1

Traceback (most recent call last):
  File "/home/dario/AnomalyDetectionCVPR2018/Test_Anomaly_Detector_public.py", line 1, in <module>
    from keras.models import Sequential
  File "/home/dario/.local/lib/python3.6/site-packages/keras/__init__.py", line 2, in <module>
    from . import backend
  File "/home/dario/.local/lib/python3.6/site-packages/keras/backend/__init__.py", line 64, in <module>
    from .tensorflow_backend import *
  File "/home/dario/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 17, in <module>
    _LEARNING_PHASE = tf.placeholder(dtype='uint8', name='keras_learning_phase')  # 0 = test, 1 = train
AttributeError: module 'tensorflow' has no attribute 'placeholder'

What version of tensorflow did you use? (and please add it to the requirements in the README.md)

WurmD commented 4 years ago

pip3 install tensorflow==1.15.4 and updating the code to python 3 works