What’s the Best Deep Learning Framework?

By | October 19, 2018

Think of a deep learning framework as a grocery store.

Rather than laboring in individual backyard farms, most people shop at markets when they want to whip up a meal.

Just as they don’t pick lettuce and uproot carrots when they have a hankering for salad, developers don’t want to start from scratch every time they build a deep learning neural network.

Deep learning models are large and complex, so instead of writing out every function from the ground up, programmers rely on frameworks and software libraries to build neural networks efficiently. The top deep learning frameworks provide highly optimized, GPU-enabled code that are specific to deep neural network computations.

Different grocers specialize in unique sets of inventory. You might cover a basic recipe at your local supermarket. But you might prefer Whole Foods for that certain kind of mushroom. Or a farmer’s market for organic greens. Or a big-box store when cooking for a crowd.

Similarly, though a developer can build most types of networks (like CNNs or RNNs) in any deep learning framework, each framework is best-suited to a different set of neural network architectures.

Developers can access frameworks through the command line, script interfaces in programming languages like Python or C/C++, and user interfaces like NVIDIA DIGITS. This unlocks the power of GPU speedups without developers needing to write complex code.

NVIDIA GPU Cloud provides instant access to all of the frameworks mentioned below, and many more, delivering optimal GPU-accelerated performance on demand.

Ranked by beginner-friendliness:

  1. Keras
  2. PyTorch
  3. TensorFlow
  4. Caffe
  5. Microsoft Cognitive Toolkit
deep learning frameworks
NVIDIA GPU Cloud gives developers instant access to these and other top deep learning frameworks.


The most popular deep learning framework

Popularity ranking? 1st
Beginner friendly ranking? 3rd
Programming language? C++, Python

Best for? TensorFlow is the world’s most widely used deep learning framework. Because of its popularity, the framework has extensive documentation and wide community support for developers. It works primarily with static graphs, making it good for training fixed-sized neural networks like CNNs. It has strong performance on multi-GPU applications and is one of the strongest frameworks for production due to its scalability.

One example of what you can do with TensorFlow: AI and deep learning for cancer diagnosis


The most beginner-friendly deep learning framework

Popularity ranking? 2nd
Beginner friendly ranking? 1st
Programming language? Python

Best for? Keras is an interface that can run on top of multiple frameworks like TensorFlow, Theano and Microsoft Cognitive Toolkit. It uses a high-level Python API, making it a go-to source for beginners looking to build their first deep learning models. Keras uses object-oriented design, resulting in a cleaner interface. However, since it’s a general purpose interface, its performance levels are lower than other frameworks.

One example of what you can do with Keras: How AI could help people dodge hurricanes


The no-coding-required deep learning framework

Popularity ranking? 3rd
Beginner friendly ranking? 4th
Programming language? C++, Python, MATLAB

Best for? Caffe is a deep learning framework that works well for the production and deployment of neural networks. Created at UC Berkeley, it’s good for feed-forward neural networks like CNNs, but it doesn’t provide as much support for large or recurrent networks. Caffe is speedy for learning and inference, and it can process more than 1200 images per second on a cluster of four Tesla P100 GPUs. Developers often can simply define their network architecture and training parameters, then call up the scripts they need in the command line without having to write any code.

Spinoffs: NVCaffe is an NVIDIA-maintained fork of Caffe, specially tuned for multi-GPU use. And Caffe2, developed by Facebook, is a spinoff framework that can express both convolutional and recurrent neural networks and supports GPUs.

One example of what you can do with Caffe: How AI could spot lung cancer sooner

Microsoft Cognitive Toolkit

The speedy deep learning framework

Popularity ranking? 4th
Beginner friendly ranking? 5th
Programming language? Python, C++

Best for? Originally called CNTK, this deep learning framework from Microsoft powers its own AI models, like Cortana. Since it was originally built for speech recognition, this framework works particularly well on RNNs, but also supports other kinds of neural networks. Microsoft Cognitive Toolkit is faster than other frameworks for training AI models, an attractive feature for developers.

One example of what you can do with Microsoft Cognitive Toolkit: Microsoft uses GPUs to build record-breaking image recognition system


The researcher’s deep learning framework

Popularity ranking? 5th
Beginner friendly ranking? 2nd
Programming language? Python

Best for? First there was Torch, a popular deep learning framework based on the programming language Lua. Then, Facebook introduced PyTorch, which takes the features developers liked from Torch and implements them in Python. This framework allows users to take advantage of Python features like loops, and it makes debugging easy. PyTorch is an especially attractive option for researchers because it’s well-suited to dynamic graph networks like RNNs, where the size of the input and output data is variable. It’s often used to build natural language processing models.

One example of what you can do with PyTorch: AI-driven 3D cell modeling

Mixing and Matching Top Frameworks

Depending on the application at hand, developers may want to build and train a deep learning model using one framework, then deploy it for inference using a different one. The Open Neural Network Exchange, known as ONNX, is a format for deep learning models that allows developers to move their models between frameworks. ONNX currently supports Caffe2, Microsoft Cognitive Toolkit, PyTorch and other frameworks.

Those looking for a user-friendly interface to build a deep neural network can explore DIGITS, a web application that allows developers to work with the Caffe, Torch or TensorFlow frameworks without writing any code. Users need only to provide the datasets and define the network architecture.

For additional resources and install information for deep learning frameworks, explore the NVIDIA Developer site.

The post What’s the Best Deep Learning Framework? appeared first on The Official NVIDIA Blog.

Read the original article

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.