Title: An interview with François Chollet - PyImageSearch

URL Source: https://pyimagesearch.com/2018/07/02/an-interview-with-francois-chollet/

Published Time: 2018-07-02T14:00:15+00:00

Markdown Content:
![Image 1](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20183'%3E%3C/svg%3E)

In today’s blog post, I interview arguably one of the most important researchers and practitioners in modern day deep learning, **François Chollet**.

François is not only the creator of the **Keras deep learning library**, but he’s also a **Google AI researcher.** He will also be speaking at [PyImageConf 2018](https://www.pyimageconf.com/) in August of this year.

**Inside this interview François discusses:**

*   His inspiration to study AI
*   The reason why he created Keras
*   How deep learning will eventually be prevalent in every industry, every business, and every non-profit
*   Problems and challenges in the AI industry (and how we can help solve them)
*   What he would change about the deep learning field, and how the research community may be in trouble
*   His advice to you, as a PyImageSearcher, on the optimal way to study deep learning

Please, join me in welcoming François to the PyImageSearch — it is truthfully a privilege to have him here.

![Image 2](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20500%20294'%3E%3C/svg%3E)

**Figure 1:** Creator of Keras and Google researcher, [François Chollet](https://www.redhat.com/en/open-source-stories/road-to-ai) (Image credit: RedHat).

**Adrian:** Hi François! I know you are very busy with your work at Google AI and on the Keras library — I really appreciate you taking the time to do this interview. It’s quite the honor to have you on the PyImageSearch blog! For people who don’t know you, who are you and what do you do?

**François:** I work as a software engineer at Google in Mountain View, CA. **I develop Keras, a deep learning library**. I started it in 2015 as a side-project, and over time it has become bigger than intended — **over 250,000 users now, a good chunk of the deep learning world.** I also do AI research on a number of topics, including computer vision and program synthesis.

* * *

**Adrian:** What inspired you to start working in the machine learning, deep learning, and computer vision field?

**François:** I’ve been into AI for a long time. I was originally approaching it from a philosophical angle — I wanted to understand how intelligence works, what is the nature of consciousness, that sort of thing. I started by reading up on neuropsychology, which from a distance looked like the field that should be able to answer these questions. I learned everything I could, but it turned out that neuropsychology didn’t have any real answers. That was a big disappointment.

So I moved on to AI — the idea being to try to understand minds by trying to create them from first principles, bottom up, very much the reverse approach to neuropsychology. Of course, most of AI at that time wasn’t at all concerned about minds and how they might work, so I ended up in the one corner of AI that seemed most relevant to my interests: developmental cognitive robotics, which is about using robots and AI to test models of human cognitive development. Then, because I’m not very good at doing the same thing for a long time, I eventually branched out into more applied subfields, such as computer vision and natural language processing.

* * *

![Image 3](https://b2633864.smushcdn.com/2633864/wp-content/uploads/2018/06/francois_chollet_keras_logo.png?lossy=2&strip=1&webp=1)

**Figure 2:** The Keras deep learning library.

**Adrian:** Tell us a bit about the [Keras deep learning library](https://keras.io/). Why did you create it and what gap does it fill in the set of existing ML/DL libraries and packages?

**François:** I created Keras around February / March 2015. Deep learning was a very different field back then. First, it was smaller. **There might have been 10,000 people doing deep learning at the time. It’s closer to one million now.**

In terms of tools, you didn’t have many options. You could use Caffe, which was popular in computer vision, but only worked for fairly narrow use cases (convnets) and wasn’t very extensible. You could use Torch 7, which was a pretty good choice, but that meant you had to code in Lua, which doesn’t have any of the goodies of the Python data science ecosystem. Any data format you wanted to load — you had to hack together your own parser from scratch in Lua, because you weren’t going to find one on GitHub. And then there was Theano, a Python library that was very much the spiritual ancestor to TensorFlow. I liked Theano a lot, it felt like the future, but it was very low-level, pretty difficult to use. You had to write everything from scratch.

At the time I was doing research on applying deep learning to natural language processing, with a focus on question-answering. Support for RNNs in the existing tool ecosystem was near-inexistent. So I decided to make my own Python library, on top of Theano, borrowing some ideas from the parts of the Scikit-Learn API and Torch API that I liked. When I launched, the main value proposition was that Keras was the first deep learning library for Python that offered support for both RNNs and convnets at the same time. It also had the first reusable open-source implementation of a LSTM, to the best of my knowledge (previously available implementations were essentially research code). And it was pretty easy to use.

Keras starting getting users from day one, and it has been a nonstop development marathon since.

* * *

![Image 4](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20500%20228'%3E%3C/svg%3E)

**Figure 3:** Why might we use Keras over other deep learning libraries?

**Adrian:** Why might a deep learning researcher, practitioner, or developer choose Keras over other libraries/frameworks such as PyTorch, Caffe, or even just strict TensorFlow?

**François:** I think what makes Keras stand out in the deep learning framework landscape today is its focus on the user experience. **Everything in the Keras API is designed to follow best practices for reducing cognitive load, being more accessible, being more productive**. I think that’s the main reason why Keras has got to this level of adoption, even though Torch and Caffe had a big head start. You can’t overstate the importance of ease-of-use and productivity, whether for practitioners or researchers. **Going from idea to results as fast as possible, in a tight iteration loop, is key to doing great research or building a great product.**

Also, here’s one thing about Keras and TensorFlow. **There’s no “Keras or TensorFlow” choice to make. Keras is the official high-level interface to TensorFlow. It comes packaged with TensorFlow as the tf.keras module.** You can think of Keras as a frontend for deep learning, that’s tuned for ease-of-use and productivity, and that you can run on top of different backend engines, TensorFlow being the main one.

* * *

**Adrian:** One of the most exciting aspects about open source is seeing how your work is used by others. What are some of the more interesting, and even surprising, ways you’ve seen Keras used?

**François:** One thing that’s really fascinating about our field is the sheer diversity of problems that you can solve with our techniques and our tools. I’ve seen Keras being used for so many problems I didn’t even know existed. Like optimizing the operation of a salmon farm. Allocating micro-loans in developing countries. Building automated checkout systems for brick-and-mortar stores. **In general, there seems to be a gap between the set of problems that people here in Silicon Valley are aware of, and all the problems that people are facing out there and that could be solved with these technologies.**

That’s a big reason why focusing on accessibility is so important: Silicon Valley on its own is never going to solve every problem that can be solved. There will not be a Silicon Valley-based “deep learning industry” that would have a monopoly on deep learning expertise and that would sell consulting services and software to everyone else. Instead, deep learning is going to be in every industry, in every business and non-profit, a tool in everyone’s hands. Making frameworks like Keras and TensorFlow free to use and as accessible as possible is a way to initiate a kind of large-scale distributed wave of problem-solving: it’s the people who understand the target domains that are going to be building the solutions, on their own, using our tools, having 100x the impact that we alone could have.

And I think Keras has done a good job at being accessible to everyone, compared to other frameworks that only aim at being used by expert researchers and other insiders. When I talk to people doing deep learning who are outside the usual research and industry circles, it’s generally Keras they’re using.

* * *

![Image 5](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20500%20292'%3E%3C/svg%3E)

**Figure 4:** Important open source libraries, including Scikit-learn, Requests, Flask, and Theano.

**Adrian:** What are your favorite open source libraries, excluding Keras and/or TensorFlow?

**François:** I really like Scikit-Learn, it has been hugely impactful in the scientific Python ecosystem. It’s a very user-centric and well-designed library. I’m generally a big fan of user-centric design. Libraries like Requests and Flask are some good examples as well.

Also, talking about deep learning frameworks, I can’t overstate the importance that Theano has had for the deep learning world. It had its issues, but it was really visionary in many ways.

* * *

**Adrian:** Sometimes even the best intentions from well-minded people can have disastrous consequences — this logic extends to machine learning and AI as well. Would you agree with that statement? And if so, what can we as a ML/DL community do to help ensure we’re not causing more problems than we’re solving?

**François:** Yes, definitely. Applying machine learning inappropriately can potentially lead to simplistic, inaccurate, unaccountable, un-auditable decision systems getting deployed in serious situations and negatively affecting people’s lives. And if you look at some of the ways companies and governments are using machine learning today, it’s not a hypothetical risk, it’s a pressing concern.

Thankfully, I think there’s been a positive trend in the machine learning community recently. People are getting increasingly aware of these issues. **One example is algorithmic bias, which is the fact that machine learning systems reflect in their decisions the biases inherent to their training data, whether it’s due to biased data sampling, biased annotations, or the fact that the real world is biased in various ways.** A year ago this important issue was pretty much off the radar. Now it’s something that most big companies doing machine learning are looking into. So at least in terms of awareness of some of these issues, we’re making progress. But that’s just the first step.

* * *

**Adrian:** If you could change one thing about the deep learning industry, what would it be?

**François:** I think applied deep learning in the industry is generally doing well, except for a general tendency to oversell the capabilities of current technology, and be overly optimistic about the near future (radiologists will definitely still have a job in five years). **The way I see it, it’s the research community that’s in trouble.** There are many things I would change on that front.

**First, we should attempt to fix the broken incentives in the research community.** Currently we have a number of incentives that go against the scientific method and scientific rigor. **It’s easier to publish at deep learning conferences when you over-claim and under-investigate, while obfuscating your methodology**. People gravitate towards incremental architecture tricks that kinda seem to work if you don’t test them adversarially. They use weak baselines, they overfit to the validation set of their benchmarks. Few people do ablation studies (attempting to verify that your empirical results are actually linked to the idea you’re advancing), do rigorous validation of their models (instead of using the validation set as a training set for hyperparameters), or do significance testing.

**Then, we have the problem of PR-driven research.** Science-fiction narratives and neuroscience terminology have given the field of AI a special kind of aura. When it’s really a crossover subfield at the intersection of mathematics and CS. Some well-known labs pick their research projects specifically for PR, disregarding the question of what can be _learned_ from the project, what useful knowledge can be gained. **We should remember that the purpose of research is to create knowledge. It’s not to get media coverage, nor is it to publish papers to get a promotion.**

**Also, I’m sad about our broken reviewing process.** The field of deep learning has gone from a few hundreds of people to tens of thousands in less than 5 years. Most of them are young and inexperienced, often having unrealistic ideas about the field and no real experience with the scientific method. They don’t just write papers, they also review them, and that’s why you end up with the first problem I mentioned — a lack of rigor.

* * *

**Adrian:** You published a book, [_Deep Learning with Python_](https://www.manning.com/books/deep-learning-with-python), in 2017 — congrats on the release! What does your book cover and who is the target audience?

**François:** It’s a deep learning curriculum written for developers. It takes you from the basics (understanding what tensors are, what machine learning is about, and so on) to being able to handle relatively advanced problems on your own, such as image classification, timeseries prediction, text classification, and so on. It’s written with a focus on being accessible and to-the-point. One thing I’ve tried to do is to convey all mathematical concepts using code rather than mathematical notation. **Mathematical notation can be a huge accessibility barrier, and it isn’t at all a requirement to understand deep learning clearly. Code can be in many cases a very intuitive medium to work with mathematical ideas.**

* * *

**Adrian:** What advice would you give to PyImageSearch readers who are interested in studying deep learning? Would you suggest a “theory first” approach, a “hands-on” approach, or some balance between the two?

**François:** **I would definitely recommend a hands-on approach.** Theory is a higher-level framework to help you make sense of the experience you’ve gathered so far. In the absence of experience, theory makes no sense, and focusing on it too early might lead you to build misleading mental models about what you will be doing later.

* * *

**Adrian:** François, you’re a successful AI researcher, you’re highly regarded in the open source DL/ML community, you’re a writer, and you’re an artist. You’re clearly a person who enjoys the act of creating and bringing new ideas, concepts, and creative works into the world. I can absolutely appreciate and relate to this drive to create. However, when we create, whether in terms of ideas or works of art, we’re bound to encounter “haters”. How would you advise someone to handle these types of people who are overly critical/just plain disrespectful of what we create?

**François:** I think different people can behave like trolls for different reasons. But trolls seem to follow the same playbook in every field, whether art or software engineering or science. You see the same patterns across the board. The higher-profile ones seem to be playing status games, attacking someone to gather attention and elevate their own status in the eyes of any audience they might have. The anonymous ones tend to be insecure personalities who cope with themselves by playing gatekeepers, hating on “the noobs” and on outsiders, and who vent their frustration by showing cruelty towards the people or groups who most remind them of their own personal failings.

My advice is to ignore the trolls. Don’t engage with them. Don’t talk to them and don’t talk about them — don’t give them a platform. There’s nothing to be gained from engaging with people who act in bad faith and aim at being hurtful (it’s just stressful). And it deprives the trolls of the attention they seek.

* * *

[![Image 6](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20500%20333'%3E%3C/svg%3E)](https://www.pyimageconf.com/)

**Adrian:** You’ll be speaking at [**PyImageConf**](https://www.pyimageconf.com/) this year — we’re super excited and lucky to have you there. Can you tell us a bit more about what you’ll be talking about?

**François:** I’ll be talking about some of my previous research in computer vision, in particular using depthwise separable convolutions in convnet architectures. It’s a really underrated pattern in my opinion. It’s basically a set of priors about the structure of the visual space that enable you to simultaneously build much smaller models, that run faster, and that generalize better. In the same way that the translation-invariance prior leveraged by convnets is a considerable improvement compared to fully-connected networks, I think the depthwise separability prior in convnet features is strictly superior to regular convolutions when it comes to processing 2D images or continuous 3D spaces.

### What's next? We recommend [PyImageSearch University](https://pyimagesearch.com/pyimagesearch-university/?utm_source=blogPost&utm_medium=bottomBanner&utm_campaign=What%27s%20next%3F%20I%20recommend).

**Course information:**  
84 total classes • 114+ hours of on-demand code walkthrough videos • Last updated: February 2024  
★★★★★ 4.84 (128 Ratings) • 16,000+ Students Enrolled

**I strongly believe that if you had the right teacher you could _master_ computer vision and deep learning.**

Do you think learning computer vision and deep learning has to be time-consuming, overwhelming, and complicated? Or has to involve complex mathematics and equations? Or requires a degree in computer science?

That’s _not_ the case.

All you need to master computer vision and deep learning is for someone to explain things to you in _simple, intuitive_ terms. _And that’s exactly what I do_. My mission is to change education and how complex Artificial Intelligence topics are taught.

If you're serious about learning computer vision, your next stop should be PyImageSearch University, the most comprehensive computer vision, deep learning, and OpenCV course online today. Here you’ll learn how to _successfully_ and _confidently_ apply computer vision to your work, research, and projects. Join me in computer vision mastery.

**Inside PyImageSearch University you'll find:**

*   ✓ **84 courses** on essential computer vision, deep learning, and OpenCV topics
*   ✓ **84 Certificates** of Completion
*   ✓ **114+ hours** of on-demand video
*   ✓ **Brand new courses released _regularly_**, ensuring you can keep up with state-of-the-art techniques
*   ✓ **Pre-configured Jupyter Notebooks in Google Colab**
*   ✓ Run all code examples in your web browser — works on Windows, macOS, and Linux (no dev environment configuration required!)
*   ✓ Access to **centralized code repos for _all_ 536+ tutorials** on PyImageSearch
*   ✓ **Easy one-click downloads** for code, datasets, pre-trained models, etc.
*   ✓ **Access** on mobile, laptop, desktop, etc.

[Click here to join PyImageSearch University](https://pyimagesearch.com/pyimagesearch-university/?utm_source=blogPost&utm_medium=bottomBanner&utm_campaign=What%27s%20next%3F%20I%20recommend)

Summary
-------

In today’s blog post, we interviewed François Chollet, Google AI researcher and creator of the popular Keras deep learning library.

Please, take the time to leave a comment on this post and thank François for taking the time out of his busy to day to join us on PyImageSearch for this interview. We are truthfully privileged and lucky to have him here.

**Thank you, François!**

![Image 7](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20410%20567'%3E%3C/svg%3E)

#### Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF

Enter your email address below to **join the PyImageSearch Newsletter** and **download my FREE 17-page Resource Guide PDF** on Computer Vision, OpenCV, and Deep Learning.