Skip to content Skip to sidebar Skip to footer

Keras Version To Use With Tensorflow-gpu 1.4

I am using ubuntu 16, with python 3, tf-GPU with keras. I downgraded to tf 1.4 due to cuda errors as explained here But now I am getting this error TypeError: softmax() got an u

Solution 1:

Keras - Tensorflow versions compatibility is a frequent problem that i have faced many times myself. I am keeping in my bookmarks this compatibility table, with matches of tensorflow and keras versions. It would seem that keras 2.0.8 is compatible with tensorflow 1.4.

Solution 2:

If you are using keras exclusively with the tensorflow backend, I would recommend to use the keras implementation found in tf.keras rather than the keras module. That way, you won't scratch your head about possible incompatibilities or bugs (see also that question).

Solution 3:

There does not seem to be proper documentation on which Keras version targets which TensorFlow version. The quickest way to solve your problem may be just downgrading Keras one version at a time until you find one that works (or, conversely, upgrading one version at a time from one that you know to work until it breaks). If you find that tedious you can do it as a binary search.

Looking at the releases page, it seems that version 2.0.8 should be compatible with TensorFlow 1.4; it's about a year old already but at least you have an starting point there.

Solution 4:

I was able to use the conda package manager to install keras and keras-gpu, with a compatible tensorflow and cuda versions to get past your TypeError: softmax()... error message when I was trying to load the original BERT tensorflow checkpoint using the keras-bert package:

$ conda create -n bert python=3.6$ conda activate bert
$ conda install keras==2.0.8$ conda install keras-gpu==2.0.8$ pip install keras-pos-embd==0.10.0$ pip install keras-transformer==0.22.0

Solution 5:

I am using tensorflow version 1.15.4 and installing Keras version 2.3.1 fixed my problem.

BTW, this page is useful. Find your intended tensorflow version and then click on corresponding Packages and Nvidia Settings.

setuptools==41.0.0
numpy
matplotlib
pandas
pydub
scipy
tensorflow==1.15.4
keras==2.3.1
python_speech_features
praat-parselmouth
pyquaternion

Post a Comment for "Keras Version To Use With Tensorflow-gpu 1.4"