Has anyone been able to download keras 2.4.0? - python-3.x

I’ve been trying to install keras 2.4.0 for a while but I can’t, I tried to do “pip install keras 2.4.0” but it installs me keras 2.5.0 instead on colab like it can’t find the keras 2.4.0 version anymore.
Would you please have a solution to install the keras 2.4.0 version?
Thanks

Related

TensorFlow and Keras GPU usage issues

I am using an existing model to train a CRNN model which is based on Tensorflow and Keras. I am using anaconda-navigator to train the model.
When the model is being trained, it does not seem to use GPU as my GPU usage is at 5-6%.
I am attaching images of top -i command, Nvidia Xserver, and also my gpu is not being picked up by Tensorflow as tf.test.gpu_device_name() only shows CPU as shown in the below screenshot tf.test.gpu_device_name()
Tensorflow and Keras Versions in anaconda
top -i output
After looking at your TensorFlow and Keras versions in anaconda, i found there is a tensorflow-gpu package missing. It looks like you have only installed TensorFlow CPU version and not the GPU version. If you had installed the GPU version of TensorFlow, then the anaconda navigator would also show a metapackage of TensorFlow GPU library.
That is the reason why you don't see the details of your GPU with the command tf.test.gpu_device_name()
TensorFlow GPU will automatically load the CUDA libraries corresponding to your GPU.
Since you are using anaconda environment install the GPU version as follows
Activate your conda environment
conda install -c anaconda tensorflow-gpu
This command would install TensorFlow v2.2.0 to your conda environment.
If you want the latest tf v2.4 then try using pip to install the specific version inside your conda environment
pip install tensorflow-gpu==2.4
Keras will automatically be installed with TensorFlow 2.0 verison. You can use Keras library with TensorFlow backend. If you want a specific version of Keras, you can always install it using pip

How can I use 3 different versions of keras in a single code?

I want to use keras 2.4.3 for some part of code and similarly I have to use versions 2.3.0 and 2.1.6 for other two parts of the same code.
please help
pip install keras==2.4.3
pip install keras==2.3.0
pip install keras==2.1.6

How to fix spaCy en_model incompatible with current spaCy version (2.3.2)?

When I am running my NER model I am getting:
UserWarning: [W031] Model 'en_model' (0.0.0) requires spaCy v2.2 and is incompatible with the current spaCy version (2.3.2)
Please advise how can I fix it?
Python 3.7.9, spaCy 2.3.2, Ubuntu 18.04.
Solved by downgrading spaCy to 2.2.4.
pip3 install spacy==2.2.4

nyoka package install conflict with keras/tensorflow version

I have installed tensorflow-gpu and keras on my gpu machine for deep learning training. The tensorflow version is 1.12. However, nyoka (pmml converter package of python) has conflict because of tensorflow dependencies. I think it uses tensorflow 1.2. Can there be any workaround for it?
Which version of Nyoka are you using? The issue was there prior to version 3.0.1. The latest version of nyoka (3.0.6) does not have tensorflow as a dependency. Could you try with the latest version?

Keras - ImportError: cannot import name 'CuDNNLSTM'

I am trying to use the CuDNNLSTM Keras cell to improve training speed for a recurrent neural network (doc here).
When I run:
from keras.layers import Bidirectional, CuDNNLSTM
I get this error:
ImportError: cannot import name 'CuDNNLSTM'
My configuration is Keras 2.0.8, python 3.5, tensorflow-gpu 1.4.0 (all managed by Anaconda) and I have both CUDA 8.0 and cudnn 6.0 installed that should be OK with the nvidia dependencies of tensorflow (here). My code setup makes Keras effectively use tensorflow backend, and every layer except the ones starting with CuDNN* work fine.
Anyone has an idea about the source of this import error ?
And for Tensorflow-2: You can just use LSTM with no activation function and it will automatically use the CuDNN version
It turns out keras 2.0.8 doesn't have the code for these kind of layers that came in more recent versions.
I used pip to upgrade to the lastest version:
pip install --upgrade keras
and it all works now.
These layers have been deprecated in the latest versions.
For a detailed tutorial you can see this Keras guide
in conda it will be (as of nov 2019)
conda config --add channels conda-forge
conda install keras==2.3.0

Resources