The following list of deep learning frameworks might come in handy during the process of selecting the right one for the particular challenges that you’re facing. Compare the pros and cons of different solutions, check their limitations, and learn about best use cases for each solution!
Created by Google and written in C++ and Python, TensorFlow is perceived to be one of the best open source libraries for numerical computation. It just has to be good, especially if giants like DeepMind, Uber, AirBnB, or Dropbox have all decided to leverage this framework.
TensorFlow is good for advanced projects, such as creating multilayer neural networks. It’s used in voice/image recognition and text-based apps (like Google Translate).
Of course, experts have considered both its pros...
It has a lot of documentation and guidelines;
It offers monitoring for training processes of the models and visualization (Tensorboard);
It’s backed by a large community of devs and tech companies;
It provides model serving;
It supports distributed training;
Tensorflow Lite enables on-device inference with low latency for mobile devices;
It struggles with poor results for speed in benchmark tests compared with, for example, CNTK and MXNet,
It has a higher entry threshold for beginners than PyTorch or Keras. Plain Tensorflow is pretty low-level and requires a lot of boilerplate coding, And the default Tensorflow “define and run” mode makes debugging very difficult.
There is also one significant limitation: the only fully supported language is Python.
PyTorch is the Python successor of Torch library written in Lua and a big competitor for TensorFlow. It was developed by Facebook and is used by Twitter, Salesforce, the University of Oxford, and many others.
PyTorch is mainly used to train deep learning models quickly and effectively, so it’s the framework of choice for a large number of researchers.
It has some significant advantages:
The modeling process is simple and transparent thanks to the framework’s architectural style;
The default define-by-run mode is more like traditional programming, and you can use common debugging tools as pdb, ipdb or PyCharm debugger;
It lacks interfaces for monitoring and visualization such as Tensorboard – though you can connect externally to Tensorboard.
And it’s important to keep in mind: PyTorch is still relatively new, and it’s best for prototyping or small-scale projects. When it comes to larger cross-platform deployments – TensorFlow might be a better option. But PyTorch 1.0 is getting closer!
This is a minimalistic Python-based library that can be run on top of TensorFlow, Theano, or CNTK. It was developed by a Google engineer, Francois Chollet, in order to facilitate rapid experimentation. It supports a wide range of neural network layers such as convolutional layers, recurrent layers, or dense layers.
One can make good use of it in areas of translation, image recognition, speech recognition, and so on.
Prototyping is really fast and easy;
It’s lightweight in terms of building DL models with a lot of layers;
It features fully-configurable modules;
It has a simplistic and intuitive interface – fantastic for newbies;
It has built-in support for training on multiple GPUs; It can be turned into Tensorflow estimators and trained on clusters of GPUs on Google Cloud;
It can be run on Spark;
It supports NVIDIA GPUs, Google TPUs, and Open-CL-enabled GPUs such as AMD.
...can easily blot out small disadvantages:
It might be too high-level and not always easy to customize;
It is constrained to Tensorflow, CNTK, and Theano backends.
It also doesn’t provide as many functionalities as TensorFlow, and ensures less control over the network, so these could be serious limitations if you plan to build a special type of DL model
Caffe is a framework implemented in C++ that has a useful Python interface. It supports CNNs and feedforward networks, and is good for training models (without writing any additional lines of code), image processing, and for perfecting existing networks. However… it’s sometimes poorly documented, and difficult to compile. There is no sign of any bigger company deploying Caffe right now.
It offers pre-trained models for building demo apps;
It’s fast, scalable, and lightweight;
It works well with other frameworks, like PyTorch, and it’s going to be merged into PyTorch 1.0;
It has server optimized inference.
The main cons include…
Limited community support.
And although Caffe2 is doing really well in space and speed tests, it is still quite new and might be a bit limited when it comes to implementing complex networks that require, for instance, useful debugging tools, or some help from a supportive community.
If your core programming language is Java – you should definitely take a closer look at DL4J. It’s a commercial-grade, open-source framework written mainly for Java and Scala, offering massive support for different types of neural networks (like CNN, RNN, RNTN, or LTSM).
It’s a great framework of choice, with a lot of potential in areas of image recognition, natural language processing, fraud detection, and text mining. Plus:
It’s robust, flexible and effective;
It can process huge amounts of data without sacrificing speed;
It works with Apache Hadoop and Spark, on top of distributed CPUs or GPUs;
The documentation is really good;
It has a community version and an enterprise version.
Surprisingly, when talking about DL4J, experts do not focus on any particular drawback of the framework as much as they do on the general cons of using Java for machine learning. Because Java is not very popular among machine learning projects, the framework itself cannot rely on growing codebases. As a result, the costs of development for your project may be much higher, significantly slowing down your business…
Another Python-based DL framework, supported by giants like IBM, Intel, Nvidia, and AWS. It can be run on multiple GPUs with little effort.
Chainer is leveraged mainly for speech recognition, machine translation, and sentiment analysis. It supports various network architectures, like CNNs, fast-forward, nets and RNNs, and has some significant advantages over its competitors:
It’s much faster than other leading Python frameworks;
It’s super flexible and intuitive;
Existing networks can be modified at runtime.
On the other hand:
It’s more difficult to debug;
The community is relatively small.
As other Python-oriented frameworks are much more popular, you may not receive as much help with Chainer as you would with more popular frameworks, such as TF or PyTorch.