Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Проблема с запуском demo3.py #48

Closed
antk1n opened this issue Oct 24, 2019 · 2 comments
Closed

Проблема с запуском demo3.py #48

antk1n opened this issue Oct 24, 2019 · 2 comments

Comments

@antk1n
Copy link

antk1n commented Oct 24, 2019

При попытке запуска демо user@ubuntu:~/nomeroff-net/examples/py$ python3 demo3.py
возникает вот такая проблема:

2019-10-24 13:20:12.700437: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-10-24 13:20:12.764445: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1992000000 Hz
2019-10-24 13:20:12.764839: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1cb2810 executing computations on platform Host. Devices:
2019-10-24 13:20:12.764973: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
Using TensorFlow backend.
Traceback (most recent call last):
  File "demo3.py", line 20, in <module>
    from NomeroffNet import  filters, RectDetector, TextDetector, OptionsDetector, Detector, textPostprocessing, textPostprocessingAsync
  File "/home/user/nomeroff-net/examples/py/../../NomeroffNet/__init__.py", line 2, in <module>
    from .Detector import *
  File "/home/user/nomeroff-net/examples/py/../../NomeroffNet/Detector.py", line 11, in <module>
    import keras
  File "/home/user/.local/lib/python3.6/site-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/home/user/.local/lib/python3.6/site-packages/keras/utils/__init__.py", line 24, in <module>
    from .vis_utils import model_to_dot
  File "/home/user/.local/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 7, in <module>
    from ..models import Model
  File "/home/user/.local/lib/python3.6/site-packages/keras/models.py", line 10, in <module>
    from .engine.input_layer import Input
  File "/home/user/.local/lib/python3.6/site-packages/keras/engine/__init__.py", line 8, in <module>
    from .training import Model
  File "/home/user/.local/lib/python3.6/site-packages/keras/engine/training.py", line 24, in <module>
    from . import training_arrays
  File "/home/user/.local/lib/python3.6/site-packages/keras/engine/training_arrays.py", line 15, in <module>
    from .. import callbacks as cbks
  File "/home/user/.local/lib/python3.6/site-packages/keras/callbacks/__init__.py", line 19, in <module>
    if K.backend() == 'tensorflow' and not K.tensorflow_backend._is_tf_1():
AttributeError: module 'keras.backend.tensorflow_backend' has no attribute '_is_tf_1'

убунту 18.04 LTS
питон 3.6.8
cv2 4.1.1
tf 1.14.0
numpy 1.17.3

@dimabendera
Copy link
Member

Возможно проблема с установленным keras
Попробуйте запустить
python3 -c "import keras"
Если ошибка повторится, то переустановите ваш keras
pip3 uninstall keras
pip3 install keras==2.2.5 --upgrade

@antk1n
Copy link
Author

antk1n commented Oct 24, 2019

спасибо, второй вариант помог

@antk1n antk1n closed this as completed Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants