Think of a deep learning framework as a grocery store.
Rather than laboring in their own 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 is specific to deep neural network computations.
Differences Between Deep Learning Frameworks
Different grocers specialize in unique sets of inventory. You might find basic recipe ingredients at your local supermarket. But you might prefer an upscale grocer for an exotic salad green, and a farmer’s market for organic, tree-ripened fruit. 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, frameworks vary in the quantity of examples available and the frequency of updates to these examples. There are also differences in the number of contributors actively adding new features and the way the framework exposes functionality through its APIs.
The top frameworks are open-source and under active development — with the majority having been released since 2014.
How to Choose a Deep Learning Framework
Developers may choose a deep learning framework based on how closely its front-end interface matches their skillset, how much community support is available, or how quickly new features are being developed in their particular area of interest.
Frameworks can be accessed through the command line, script interfaces in programming languages such as Python or C/C++, and graphical interfaces like NVIDIA DIGITS, which allow developers to build a deep neural network in a more user-friendly web application.
If you’re a developer integrating your deep learning application with NVIDIA GPUs, check out the NVIDIA Developer Program to learn more.
How to Move Models Between Deep Learning Frameworks
Depending on the application at hand, developers may want to build and train a deep learning model using one framework, then re-train or deploy it for inference using a different framework.
When a deep learning application has been trained and is ready for deployment, our TensorRT software optimizes models for high-performance inference on NVIDIA GPUs. TensorRT is tightly integrated with TensorFlow and MATLAB, and also supports importing from the ONNX format.
Here are some of the most popular frameworks used for deep learning, with examples of how companies and researchers are building GPU-accelerated applications for healthcare, disaster prediction and cell biology.
Apache MXNet
For inference, developers can export to ONNX, then optimize and deploy with NVIDIA TensorRT.
Caffe
To optimize and deploy models for inference, developers can leverage NVIDIA TensorRT’s built-in Caffe model importer.
Chainer
For inference, developers can export to ONNX, then optimize and deploy with NVIDIA TensorRT.
Keras
MATLAB
For inference, developers can use TensorRT through MATLAB GPU Coder to automatically generate optimized inference engines.
Microsoft Cognitive Toolkit
Originally called CNTK, this deep learning framework from Microsoft was introduced in 2014 and powers the company’s own AI models, like Cortana. Health tech company IRIS uses NVIDIA Tesla GPUs and Microsoft Cognitive Toolkit to help prevent diabetic retinopathy, or diabetes-induced blindness. Unless spotted by regular eye exams, the condition can sneak up on a patient. IRIS’ neural networks analyze retinal images, recommending whether a patient needs to be referred to a physician.
For inference, developers can export to ONNX, then optimize and deploy with NVIDIA TensorRT.
PyTorch
For inference, developers can export to ONNX, then optimize and deploy with NVIDIA TensorRT.
TensorFlow
For inference, developers can either use TensorFlow-TensorRT integration to optimize models within TensorFlow, or export TensorFlow models, then use NVIDIA TensorRT’s built-in TensorFlow model importer to optimize in TensorRT.
A Broad Ecosystem of Frameworks
New deep learning frameworks are being created all the time, a reflection of the widespread adoption of neural networks by developers. Early players like Theano and Torch have powered many deep learning applications, but the creators in 2017 announced that they would stop developing the frameworks.
NVIDIA’s deep learning frameworks team works on many of these open-source efforts directly, making more than 800 total contributions last year to improve ease of use and performance.
The NGC container registry provides instant access to many of the frameworks mentioned above, delivering optimal GPU-accelerated performance on demand.
For additional resources and install information for deep learning frameworks, see the NVIDIA Developer site. This hub also provides example neural network training scripts for some of the most common deep learning frameworks and applications, such as computer vision, translation and object detection. Our packaged deep learning containers can be found in the NVIDIA GPU Cloud catalog.