0

I want to ask about compatibility issues between keras and tensorflow.

Specifically, how can I find the latest compatible version of keras and tensorflow? I found a lot of places including the official website of keras and did not find how to find the tensorflow version compatible with the latest keras2.24.

My current version of tensorflow+keras is 1.4.0+2.1.0, which does not support some new features.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
yinghao yu
  • 1
  • 1
  • 1

3 Answers3

2

If you don't care about having the latest Keras version, you can use the tf.Keras module that is already available with your Tensorflow installation. Check here

As per the doc:

tf.keras can run any Keras-compatible code, but keep in mind:

The tf.keras version in the latest TensorFlow release might not be the same as the latest keras version from PyPI. Check tf.keras.version. When saving a model's weights, tf.keras defaults to the checkpoint format. Pass save_format='h5' to use HDF5.

borarak
  • 1,130
  • 1
  • 13
  • 24
0

I have tensorflow 1.12.0 with keras 2.2.4. I got this by downloading the latest (Anaconda3-2018.12-Windows-x86_64.exe) anaconda which has conda 4.6.4 and python 3.6.8. I believe I then did a conda update conda and a conda update anaconda.

I then did a conda install tensorflow and a conda install keras.

Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
  • Unfortunately doesn't seem to fit any longer. Versions: python=3.8 and tensorflow 2.1.0 . I also get the same error as the OP using both tensorflow 2.1.0 with tensorflow-gpu 2.1.0 – Cadoiz Jul 25 '20 at 11:32
  • more stuff here: https://stackoverflow.com/questions/62376660/installing-tensorflow-2-gets-a-dll-failed-to-load-in-pywrap-tensorflow-py got tf2 to work with py 3.8 by using virtual environments. – Ray Tayek Jul 25 '20 at 19:02
0

Activate your environment and update your anaconda version using

conda update anaconda

Next uninstall tensorflow and keras as below

pip uninstall keras
pip uninstall tensorflow

Install Keras and tensorflow again

pip install tensorflow
pip install keras

check the version is updated.If it is not possible comment below.

Hasee Amarathunga
  • 1,901
  • 12
  • 17