Short Bytes: Caffe2 is Facebook’s new Open Source Deep Learning Library. In contrast to its previous PyTorch library, Caffe2 is built especially for bringing Deep Learning to Mobile Applications. Our Smartphones are gonna get more “Deeply” smarter soon!!. 

If you think Deep Learning is just about math, you are gravely mistaken. Various research labs across the world try to develop efficient and fast software frameworks that enable the researchers or the general public, to implement and test the Deep Learning models. Every now and then new efficient libraries are being released aimed at various requirements. One such framework is Caffe2.

Caffe2 is a modular Deep Learning framework released by Facebook for Mobile Computing. As a demonstration, the new camera features of Facebook’s Messenger uses Caffe2 for its cool image features. You can check that out. Facebook joined hands with NVIDIA  to fine tune its libraries to fully exploit the potential of NVIDIA’s GPUs. Moreover, they have also built special dedicated libraries for ARM CPUs, Raspberry Pi and various IoT devices.

Also Read: What Is Deep Learning?

Yet another Deep Learning Framework

There are a wide variety of Deep Learning and Machine Learning frameworks available for almost all major programming languages. The widely used ones are Tensorflow, (Py)Torch and Theano (with various front-ends like Keras etc). What is the need for a new one? We have to acknowledge this question first.

Well, there is always a need for improvements in Hardware support and capabilities, and more importantly, Deep Learning is like the ebullient cauldron of a witch. Every now and then a magic Deep Learning potion is created. To keep up with that, we need more advanced boilers and cauldrons. (The potion ingredients being the math). This is where these frameworks come in.

Source - Pytorch Forums Caffe2
Comparison of DL Libraries. Source – PyTorch Forums

So, what new features does Caffe2 has to offer? Firstly, FAIR researchers are tending towards the concept of “unframework” wherein they focus more on building key blocks of AI separate libraries like FAISS, Gloo etc and integrating them into lightweight libraries like Caffe2 and PyTorch for more flexible and agile development. This provides more transparency to the library at the same time provides a strong base. Greater improvements to those basic blocks can be easily integrated into these libraries.

Secondly, Caffe is already a popular Deep Learning framework within academic circles for its easy customizability and Caffe2 is its natural extension for building production-ready applications based on the research models. There is a wave of optimism that Caffe2 will be widely accepted within the AI community soon.

LEARN MACHINE LEARNING SQUARE AD

The Capabilities

  • Emphasis on Mobile Computing – Caffe2 is optimized for ARM CPUs and boasts of outperforming the on-board GPUs. It supports Andriod and iOS.
  • Lightweight and Scalable
  • Supports Distributed computing
  • Production Ready
  • Rich Python and C++ APIs
  • “Code once, Run Anywhere”

Moreover, as a kickstart, Caffe2 also provides inbuilt models of standard deep learning architectures so that anyone can build upon them rather than from scratch.

You may have heard about the widely popular PyTorch framework released by Facebook a few months ago. PyTorch was developed exclusively for research – building exotic neural networks and experimentation. Caffe2 is built for industrial strength models that can be deployed for large-scale data across various mobile platforms.

The Promises

Building a usable and stable Open Source library is a harder task than it seems. This is one of the premises where famous Deep Learning Libraries like Tensorflow fail to level up. Especially, managing an Open-Source library in a hot field like Deep Learning is a hard task. They have so many contributors and pull-requests that managing them is tedious. The delay incurred in turn disappoints contributors. To resolve this, Caffe2 developers have promised faster and transparent acceptance from contributors to further enhance Caffe2.

Furthermore, FAIR has promised interoperability across PyTorch and Caffe2, so that experimental models can be deployed directly onto mobile platforms using Caffe2 thereby granting the wish of great many AI startups. But the point to note here is that Caffe2 does not support dynamic graphs because it may incur computational overloads that the mobile platforms currently cannot support.

Nonetheless, Caffe2 is a great leap in Deep Learning software with the right philosophies and approaches. It has also taught us that building software is also about the philosophy behind it.

So what do you think about Caffe2? In your opinion what are the current drawbacks of the frameworks? Share it with us in the comments.

Also Read: Most Popular Programming Languages For Machine Learning And Data Science
Anand Krish
Research Student working on Robotics and Deep Learning