All Articles

Choosing a Deep Learning Framework

Introduction

So you are here cause you need to choose a deep learning framework and you feel a bit lost, that’s ok, we are all lost, the Deep Learning landscape is moving fast, but some dominant frameworks are now stable, and it’s possible to make an informed choice without having to throw all your work away just after 3 months.

However, how do you choose the right framework for you? Every person you spoke to tell you a different story, every article on the internet is trying to convince you to pick this, or that framework cause is cooler/faster/sexier/thatFamousPersonSaySo, this happens every time you have to choose something, in particular in software development we all thing we get it right, and everything else sucks, well guess what? That’s not true.

So let’s get started.

The cool kids in the block

The 5 deep learning frameworks logos.

It’s mandatory for me to introduce the frameworks I’m taking into consideration in this article, I’m not going to describe the ins and outs of them, you can go to their website or search on the internet for one of the thousands of articles that describe them. The order of the list doesn’t matter:

The frameworks in this list are not the only in the world, but I’m considering only the ones that you can use in production with a reasonable degree of confidence.

Who are you?

In this section, I’m going to pick some hypothetical situations, and I’ll try to find the best framework for every different situation, I ask you to try to identify yourself in one of the situations to get out the most from this article.

Computer Science Student

You are looking for your first framework to start doing something new and fun with Deep Learning.

You are in a great situation cause you can pick whatever you want, please follow a couple of advice while making your choice :

  • Avoid DL4J: It’s an excellent framework, but it has a particular target in mind (enterprise java factory), so you don’t want to pick this framework unlike you really like java, but probably you don’t.
  • Just pick one: In 2019 every framework have almost the same functionalities, there are just some minor differences between them, so don’t get stuck in evaluating every little detail for every framework, pick one.
  • Stay loyal: Don’t continue to switch framework, if you are getting started with deep learning stay loyal with your original choice, instead of learning multiple frameworks maybe build something real with the framework you choose. For example, a demo application, and put that online on your website, build something for yourself from top to bottom, really get your hand dirty.

Suggested Frameworks: TensorFlow, PyTorch, or MXNet.

To avoid: DL4J.

Software Developer not using deep learning inside his company

You are a developer with some years of experience looking to get your hand dirty with the new cool thing that is Deep Learning.

Fantastic, from my point of view, Deep Learning is like programming 2.0, it’s a new way to solve problems that were unsolvable before.

If you want to switch career follow my recommendation for students, if you want to stay on your role but get your hands dirty my suggestion is to study a lit bit of every and be prepared to go vertical on a framework when you need it.

Suggested Frameworks: TensorFlow, PyTorch, MXNet, Chainer, and DL4J.

To avoid: N/A

Software Developer in a company that uses or want to use Deep Learning

You are working in a company that uses, or that are thinking about using, Deep Learning in production, lucky you.

If your company is already using Deep Learning, go and learn the framework that is already adopted, I think that a company needs to be aligned about the internal technological stack, especially in a field like Deep Learning.

If your company is thinking about getting started with Deep Learning, the framework choice depends on your actual technological stack:

  • Your company is a Java factory: DL4J.
  • Your company is on AWS: Give a shot to MXNet, or go with the always good TensorFlow.
  • Your company is on Google Cloud: TensorFlow.
  • Your company is in Japan: Chainer.
  • Your company doesn’t use Python in production: DL4J for Java stack or MXNet that have many bindings for different languages.
  • Your company is a startup: PyTorch with FastAi library, fast and easy to use.

The point is put your focus on the final result and not on the framework, build something fast and iterate over it, this is valid for software development, and it’s even more valid for Deep Learning project.

Suggested Frameworks: TensorFlow, PyTorch, MXNet, Chainer or DL4J.

To avoid: N/A

Researcher in Computer Science

Don’t ask the internet, ask your advisor or some of your coworkers, if you are entirely lost, go with PyTorch.

Suggested Framework: PyTorch

To avoid: N/A

Researcher outside Computer Science

Go with PyTorch.

If you are working with something that “really” needs to go fast out of the box, go with MXNet.

If you don’t know anything about Deep Learning, go with PyTorch and FastAi or TensorFlow, these two frameworks have an enormous amount of learning resources ready for you.

Suggested Frameworks: PyTorch, TensorFlow or MXNet.

To avoid: N/A

Conclusion

The suggestions in this article are only my opinions, if you disagree with me, please leave a comment or contact me so that we can have a chat and learn something from each other.

I hope that this article can help you just a little bit getting started with Deep Learning, remember that the frameworks are just the tip of an iceberg, don’t get stuck at this phase, pick one, build something great and have fun.