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

Which version of Keras, Tensorflow and Pytorch are compatible? #54

Open
asr-lord opened this issue Jun 25, 2021 · 7 comments
Open

Which version of Keras, Tensorflow and Pytorch are compatible? #54

asr-lord opened this issue Jun 25, 2021 · 7 comments

Comments

@asr-lord
Copy link

I'm using Google Colab to run this code over CPU and GPU but it doesn't work when I'm trying to run it.

My libraries version:

Keras==2.4.3
tensorflow==2.5.0
torch==1.9.0+cu102

Error message:

python speakerDiarization.py

2021-06-25 12:23:18.495455: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "speakerDiarization.py", line 11, in <module>
    import model as spkModel
  File "ghostvlad/model.py", line 28, in <module>
    class VladPooling(keras.engine.Layer):
AttributeError: module 'keras.engine' has no attribute 'Layer'

I tried with older versions of Tensorflow and Keras:

tensorflow==2.1
Keras==2.3.1

but I still getting errors:

Using TensorFlow backend.
2021-06-25 12:29:00.291956: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib64-nvidia
2021-06-25 12:29:00.292135: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib64-nvidia
2021-06-25 12:29:00.292155: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
  File "speakerDiarization.py", line 11, in <module>
    import model as spkModel
  File "ghostvlad/model.py", line 3, in <module>
    import keras
  File "/usr/local/lib/python3.7/dist-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/usr/local/lib/python3.7/dist-packages/keras/utils/__init__.py", line 26, in <module>
    from .vis_utils import model_to_dot
  File "/usr/local/lib/python3.7/dist-packages/keras/utils/vis_utils.py", line 7, in <module>
    from ..models import Model
  File "/usr/local/lib/python3.7/dist-packages/keras/models.py", line 10, in <module>
    from .engine.input_layer import Input
  File "/usr/local/lib/python3.7/dist-packages/keras/engine/__init__.py", line 3, in <module>
    from .input_layer import Input
  File "/usr/local/lib/python3.7/dist-packages/keras/engine/input_layer.py", line 7, in <module>
    from .base_layer import Layer
  File "/usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py", line 12, in <module>
    from .. import initializers
  File "/usr/local/lib/python3.7/dist-packages/keras/initializers/__init__.py", line 124, in <module>
    populate_deserializable_objects()
  File "/usr/local/lib/python3.7/dist-packages/keras/initializers/__init__.py", line 49, in populate_deserializable_objects
    LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
AttributeError: module 'tensorflow_core.compat.v2' has no attribute '__internal__'
@taylorlu
Copy link
Owner

tensorflow 1.8-1.15 and pytorch 1.3.0 may work.

@Grolaf
Copy link

Grolaf commented Jul 7, 2021

Hey there !

I installed tensorflow 1.15 and pytorch 1.3.0 but the keras version required by the code is missig, since the last keras version require tensorflow 2.2.0....

Which version of keras do we need ?

Thanks for all !

@taylorlu
Copy link
Owner

taylorlu commented Jul 7, 2021

You can take a look at this page https://docs.floydhub.com/guides/environments

@asr-lord
Copy link
Author

asr-lord commented Jul 7, 2021

I have tried it but with no luck.

@taylorlu
Copy link
Owner

taylorlu commented Jul 8, 2021

Tensorflow 1.8.0
Keras 2.2.4
pytorch 1.3.0

@tanujdhiman
Copy link

Tensorflow 1.8.0
Keras 2.2.4
pytorch 1.3.0

speak

@ghost
Copy link

ghost commented Oct 13, 2021

Is this working with python 3.8.x?
I'm using python 3.8 and couldn't find tensorflow 1.x version.
Any updates would be helpful for Ubuntu 20.04, Python3.8 and tensorflow 2.x

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

4 participants