keras version to use with tensorflow-gpu 1.4

前端 未结 4 1364
没有蜡笔的小新
没有蜡笔的小新 2021-02-08 04:22

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

相关标签:
4条回答
  • 2021-02-08 04:31

    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).

    0 讨论(0)
  • 2021-02-08 04:44

    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
    
    0 讨论(0)
  • 2021-02-08 04:49

    Keras - Tensorflow version's compatibility is problem that i have faced many times. I have used in the past (kept in bookmarks), this link, with matches of tensorflow and keras versions. I believe that keras 2.0.8 is compatible with tensorflow 1.4

    0 讨论(0)
  • 2021-02-08 04:52

    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.

    0 讨论(0)
提交回复
热议问题