Which version of Keras, Tensorflow and Pytorch are compatible?
See original GitHub issueI’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__'
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Pytorch Vs Tensorflow Vs Keras: Here are the Difference You ...
Both provide high-level APIs used for easily building and training models, but Keras is more user-friendly because it's built-in Python.
Read more >Keras vs TensorFlow vs PyTorch | Deep Learning Frameworks
This comparison blog on Keras vs TensorFlow vs PyTorch provides you with a crisp knowledge about the three top deep learning frameworks.
Read more >Exploring Keras vs. TensorFlow vs. PyTorch. - Turing
Keras, TensorFlow and PyTorch are the most popular frameworks in the field of deep learning. But which is the best? This article explores...
Read more >Tensorflow, PyTorch or Keras for Deep Learning
Machine learning provides us with ways to create data-powered systems that learn and enhance themselves, without being specifically ...
Read more >Install Pytorch, Tensorflow and Keras - Alwyn Mathew
Widely used deep learning frameworks such as Caffe2, Cognitive toolkit, MXNet, PyTorch, TensorFlow and others rely on GPU-accelerated ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have tried it but with no luck.