When to use Keras? When to switch for others?

Let’s begin and respect the creator.

François Chollet

This guy was probably bored during coding neural network by hand. He probably tried to make a library that has an easiest use amongst others. Don’t you believe my assumptions?

Here you can reach an interview with François Chollet: Hackernoon.

This is what really happens. He’s been working for AI many years, he has started coding Keras for his own use to work with RNN easier, then it becomes enormous.

Why Do I Use Keras Since 2016 March?

I have a YouTube channel that is dedicated for machine learning, deep learning and Python libraries that is used for these topics, in Turkish language. My aim is to increase Turkish AI content, I know artificialturk.com contradicts with that idea, but there’s not much quality website on AI, I will fullfil that I hope. I use and teach Keras since 2016, I have answered lots of questions on YouTube. I have done projects and I’m still doing.

Long Story Short, you can see that I’m teaching lots of stuff on Keras on Youtube. The reason that I’ve chosen Keras:

  • Easy to Use: Of course it looks like the person who use Keras is a lazy programmer, however, when you have first intuitive on deep learning you can code Keras. It doesn’t require mathematical calculations as PyTorch and Tensorflow (I know it’s not hard to calculate, but Keras provides to avoid messy stuff.)
  • Perfect for Beginners: Whatever your goal for deep learning is, you will try to do some examples such as MNIST, or you’re trying to do image classification. Keras suits very well for image classification, it is easy to code. No defining classes, no defining details.
  • Background Power: The code that you run is actually running the equivalent version of TensorFlow or Theano codes. It’s just a tool that makes you easily code neural network architectures for the Tensorflow and Theano.

Why not to use then?

When you’re trying to improve yourself by going through the way of machine learning (when you try to learn other algorithms, try to code neural networks by hand), you see that Keras doesn’t offer flexibility. I will define the flexibility, but I can say that, after some point, you will want to play with loss functions, want to write your own layers, want to set your own learning rate update rules. Keras tries to answer the problems, I can not say that there is no solution for these problems, however, you will say that “Why don’t I learn Tensorflow/PyTorch that I can code more flexible, instead of working on learning Keras library’s details to customize my neural network?”

When do you want to switch?

I’ll be as simple as possible. Do you want to work on object detection:


Don’t even think a second. Check for Github to check best implementations.

Is image segmentation your concern? Other libraries are more comfortable.

GAN’s are fascinating, right? Believe me, not with Keras. If you want to generate MNIST dataset, Keras has some examples on GANS. But if you want to get your hands dirty, go for other libraries.

By the way, Keras is for easy use, this is not the fault of Keras, Deep Learning has been increasing for many years but it’s still seven years old child in terms of practise.

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir