This article was posted by Adrian Rosebrock on Pyimagesearch. Adrian is an entrepreneur and Ph.D who has launched two successful image search engines, ID My Pill and Chic Engine.

Inside this blog post, **he details 9 of his favorite Python deep learning libraries. **This list is

Again, he wants to reiterate that this list *is by no means exhaustive*. Furthermore, since he is a computer vision researcher and actively work in the field, *many* of these libraries have a strong focus on Convolutional Neural Networks (CNNs).

He has organized this list of deep learning libraries into three parts.

The first part details popular libraries that you may already be familiar with. For each of these libraries, he provides a very general, high-level overview. He then details some of his likes and dislikes about each library, along with a few appropriate use cases.

The second part dives into * my personal favorite deep learning libraries* that he uses

Finally, he provides a “bonus” section for libraries that he has (1) not used in a long time, but still think you may find useful or (2) libraries that he hasn’t tried yet, but look interesting.

Let’s go ahead and dive in!

It’s pretty much impossible to mention “deep learning libraries” without bringing up Caffe. In fact, since you’re on this page right now reading up on deep learning libraries, he is willing to bet that you’ve *already* heard of Caffe.

So, what is Caffe exactly?

Caffe is a deep learning framework developed by the Berkeley Vision and Learning Center(BVLC). It’s modular. Extremely fast. *And it’s used by academics and industry in start-of-the-art applications.*

In fact, if you were to go through the most recent deep learning publications (that also provide source code), you’ll *more than likely* find Caffe models on their associated GitHub repositories.

While Caffe *itself* isn’t a Python library, it *does* provide bindings into the Python programming language. We typically use these bindings when actually *deploying* our network in the wild.

The reason he has included Caffe in this list is because it’s used *nearly everywhere*. You define your model architecture and solver methods in a plaintext, JSON-like file called .prototxt configuration files. The Caffe binaries take these .prototxt files and train your network. After Caffe is done training, you can take your network and classify new images via Caffe binaries, or better yet, through the Python or MATLAB APIs.

While he loves Caffe for its performance (it can process *60 million images per day* on a K40 GPU), he doesn’t like it as much as Keras or mxnet.

The main reason is that constructing an architecture inside the .prototxt files can become quite tedious and tiresome. And more to the point, **tuning hyperparameters with Caffe can not be (easily) done programmatically! **Because of these two reasons, he tends to lean towards libraries that allow me to implement the end-to-end network (including cross-validation and hyperparameter tuning) in a Python-based API.

Let him start by saying that * Theano is beautiful.* Without Theano, we wouldn’t have

At the very core, Theano is a Python library used to define, optimize, and evaluate *mathematical expressions* involving *multi-dimensional arrays*. Theano accomplishes this via tight integration with NumPy and transparent use of the GPU.

While you *can* build deep learning networks in Theano, he tends to think of Theano as the *building blocks* for neural networks, in the same way that NumPy serves as the building blocks for scientific computing. In fact, most of the libraries he mentions in this blog post wrap around Theano to make it more convenient and accessible.

Don’t get him wrong, he* loves Theano* — **He just doesn’t like writing code in Theano.**

While not a perfect comparison, building a Convolutional Neural Network in Theano is like writing a custom Support Vector Machine (SVM) in native Python with only a sprinkle of NumPy.

Can you do it?

Sure, absolutely.

Is it worth your time and effort?

Eh, maybe. It depends on how low-level you want to go/your application requires.

He would rather uses a library like Keras that *wraps* Theano into a more user-friendly API, in the same way that scikit-learn makes it easier to work with machine learning algorithms.

Similar to Theano, TensorFlow is an open source library for numerical computation using data flow graphs (which is all that a Neural Network really is). Originally developed by the researchers on the Google Brain Team within Google’s Machine Intelligence research organization, the library has since been open sourced and made available to the general public.

A primary benefit of TensorFlow (as compared to Theano) is *distributed computing*, particularly among *multiple-GPUs* (although this is something Theano is working on).

Other than swapping out the Keras backend to use TensorFlow (rather than Theano), he doesn’t have much experience with the TensorFlow library. Over the next few months, he expects this to change, however.

Lasagne is a *lightweight* library used to construct and train networks in Theano. The key term here is *lightweight* — it is not meant to be a heavy wrapper around Theano like Keras is. While this leads to your code being more verbose, it *does* free you from any restraints, while still giving you modular building blocks based on Theano.

Simply put: Lasagne functions as a happy medium between the low-level programming of Theano and the higher-level abstractions of Keras.

*To read the original article and see the 5 other python deep learning libraries and the bonus section, click here.*

**DSC Resources**

- Career: Training | Books | Cheat Sheet | Apprenticeship | Certification | Salary Surveys | Jobs
- Knowledge: Research | Competitions | Webinars | Our Book | Members Only | Search DSC
- Buzz: Business News | Announcements | Events | RSS Feeds
- Misc: Top Links | Code Snippets | External Resources | Best Blogs | Subscribe | For Bloggers

**Additional Reading**

- What statisticians think about data scientists
- Data Science Compared to 16 Analytic Disciplines
- 10 types of data scientists
- 91 job interview questions for data scientists
- 50 Questions to Test True Data Science Knowledge
- 24 Uses of Statistical Modeling
- 21 data science systems used by Amazon to operate its business
- Top 20 Big Data Experts to Follow (Includes Scoring Algorithm)
- 5 Data Science Leaders Share their Predictions for 2016 and Beyond
- 50 Articles about Hadoop and Related Topics
- 10 Modern Statistical Concepts Discovered by Data Scientists
- Top data science keywords on DSC
- 4 easy steps to becoming a data scientist
- 22 tips for better data science
- How to detect spurious correlations, and how to find the real ones
- 17 short tutorials all data scientists should read (and practice)
- High versus low-level data science

Follow us on Twitter: @DataScienceCtrl | @AnalyticBridge

© 2019 Data Science Central ® Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

**Most Popular Content on DSC**

To not miss this type of content in the future, subscribe to our newsletter.

- Book: Statistics -- New Foundations, Toolbox, and Machine Learning Recipes
- Book: Classification and Regression In a Weekend - With Python
- Book: Applied Stochastic Processes
- Long-range Correlations in Time Series: Modeling, Testing, Case Study
- How to Automatically Determine the Number of Clusters in your Data
- New Machine Learning Cheat Sheet | Old one
- Confidence Intervals Without Pain - With Resampling
- Advanced Machine Learning with Basic Excel
- New Perspectives on Statistical Distributions and Deep Learning
- Fascinating New Results in the Theory of Randomness
- Fast Combinatorial Feature Selection

**Other popular resources**

- Comprehensive Repository of Data Science and ML Resources
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- 100 Data Science Interview Questions and Answers
- Cheat Sheets | Curated Articles | Search | Jobs | Courses
- Post a Blog | Forum Questions | Books | Salaries | News

**Archives:** 2008-2014 |
2015-2016 |
2017-2019 |
Book 1 |
Book 2 |
More

**Most popular articles**

- Free Book and Resources for DSC Members
- New Perspectives on Statistical Distributions and Deep Learning
- Time series, Growth Modeling and Data Science Wizardy
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- How to Automatically Determine the Number of Clusters in your Data
- Fascinating New Results in the Theory of Randomness
- Hire a Data Scientist | Search DSC | Find a Job
- Post a Blog | Forum Questions

## You need to be a member of Data Science Central to add comments!

Join Data Science Central