From a Side Project to TensorFlow's Core: François Chollet on How Keras Came to Be

The creator of Keras recalls why he built it in 2015 around recurrent networks, how it moved onto TensorFlow, and what TensorFlow 2.0 means for its design.

FCFrançois Chollet嘉宾
频道
Lex Fridman Podcast
视频
11:59
阅读
4 分钟
原文
英语
在 YouTube 打开
往下滚动阅读时,视频会缩到右下角继续播放。字幕跟随阅读语言。
阅读语言共 1 种语言可读
这篇文章还没有简体中文译文,先显示英语原文。
摘要

30 秒看懂

François Chollet describes starting Keras in early 2015 as a Python-first, scikit-learn-inspired library for LSTMs and convnets at a time when Caffe dominated deep learning. He explains how it became a multi-backend framework, then joined TensorFlow's core after he moved to work with the TensorFlow team, and why TensorFlow 2.0 lets one framework serve both researchers and data scientists.

  1. 1Keras began as a tool for recurrent networksChollet found no reusable open-source LSTM implementation in early 2015, so he built his own and later made it work with convnets in the same library.
  2. 2Defining models in Python code was a niche betAt the time, Caffe and other major libraries used static configuration files, while Chollet chose code-defined models.
  3. 3Keras was "scikit-learn for neural networks"The `fit` function reduces a complex training loop to one call, and Chollet says the "magic is the point" as long as it is delightful.
  4. 4Timing helpedReleased in March 2015, Keras arrived just as the community was growing interested in recurrent networks and NLP, and it grew from there.
  5. 5Keras ran on multiple backends before it moved into TensorFlowAfter TensorFlow's release in November 2015, Chollet refactored the code so the same codebase could run on TensorFlow or Theano.
  6. 6TensorFlow 2.0 removes the usability-versus-flexibility trade-offYou can subclass models and write your own training loops with eager execution, or use the classic high-level Keras workflow, all in one framework.
全文

按章节阅读完整文稿

01

Keras started in 2015 as a Python-first library for recurrent networks

Chollet began working on Keras in February 2015, when fewer than about 10,000 people were working on deep learning and tooling was immature. Caffe, written mostly in C++, was the library everyone used, and computer vision with convnets was the most popular subfield. He was personally interested in recurrent neural networks, a niche topic then, and he had used Torch 7 and Theano along with Caffe.

He found no good tool for recurrent networks and no reusable open-source LSTM implementation, so he decided to build his own. The first pitch was a library centered on LSTMs, in Python, with models defined in code. This went against the mainstream, because Caffe and several other big libraries used static configuration files in a format like YAML to define models.

Host Lex Fridman calls it a gutsy move to stick with code when the most popular library used configuration files. Chollet notes that other libraries, such as Torch 7 and Lasagne, also defined models in code, but it was the more niche option. Keras's value proposition at the time was what he believes was the first reusable open-source Keras-style implementation of LSTMs, plus the ability to combine LSTMs and convnets in one library.

02

Usability, borrowed from scikit-learn, made Keras take off

Chollet had done a lot of work with scikit-learn before deep learning and loved it for its usability, so he drew heavily on it when designing Keras. Fridman describes Keras as scikit-learn for neural networks, and Chollet agrees, pointing to the `fit` function that reduces a complex training loop to a single call.

Some people say that hides a lot of detail, he acknowledges, but that is exactly the point. The magic is "delightful", in a good way. He released Keras in March 2015 when the deep learning community was small but many people were becoming intrigued by recurrent networks and NLP, so an easy-to-use implementation arrived at the right moment and grew from there.

03

Joining Google and TensorFlow turned a side project into a core API

Chollet joined Google a few months after releasing Keras, on a research team doing image classification, which was unrelated to Keras. Soon after arriving he saw an early internal version of TensorFlow, which struck him as an improved version of Theano, so he knew he had to port Keras to it. As a new Googler he was too busy at first, but TensorFlow's public release in November 2015 was a wake-up call.

In December he got Keras running on TensorFlow, though it was more of a refactoring than a port: he abstracted all backend functionality into one module so the same codebase could run on multiple backends, TensorFlow or Theano. TensorFlow became the default option, easier to use and, he says, much faster especially for recurrent networks, and it eventually overtook Theano.

Through 2016 Keras was still a side project, not his job assignment, even as it gained many users. That changed around October 2016, when Rajat Monga, the lead of TensorFlow, came by and invited him to spend a quarter working with the team. Chollet started integrating the Keras API more tightly into TensorFlow, first as a temporary `tf.keras` version in contrib and later in the core, and he says he never returned to his research work.

04

TensorFlow 2.0 gives researchers and data scientists one framework

Asked about TensorFlow 2.0, Chollet says he has worked on it for a long time and considers it a delightful product that makes huge progress. Previously, Keras was an easy high-level interface, but anyone wanting a lot of flexibility often found the framework got in the way compared with writing everything from scratch.

In 2.0, he says, you get the usability of the high-level interface and the flexibility of the lower-level one, with a spectrum of workflows in between. You can write everything yourself by subclassing models and writing training loops with eager execution, which is flexible, easy to debug and powerful, and it all integrates with higher-level features such as the classic Keras workflows that are ideal for a data scientist or machine learning engineer.

The same set of APIs now suits profiles from researchers to data scientists and everyone in between, instead of forcing a choice between ease of use and control.

同频道的其他文章

3:36:56EN
Lex Fridman· 2026年9月16日播客Psychiatry Has Never Found Its Penicillin主持 Lex FridmanHistorian Andrew Scull tells Lex Fridman why the field can ease symptoms, has never cured a major mental illness, and keeps paying for overconfidence with patients' lives.Mental HealthPublic HealthNeuroscience
5:15:51EN → 简体中文
Lex Fridman· 2026年8月26日播客 · 2 人对谈DHH 没有亲手写一行 Omarchy Quattro 的代码嘉宾 DHH · 主持 Lex Fridman与莱克斯·弗里德曼一次充满怀疑的对话过去十三个月后,Rails 的创造者讲述了 Opus 4.5、一群编码智能体(Agent)和一个一分钟的 Linux 安装器,如何结束了他一凿一凿手写 Ruby 的时代。编程智能体Vibe Coding智能体工程+3
3:12:58EN → 简体中文
Lex Fridman· 2026年8月12日播客 · 2 人对谈一个冷水澡,二十位冠军:Khabib Nurmagomedov 是如何炼成的嘉宾 Khabib Nurmagomedov · 主持 Lex Fridman在马哈奇卡拉的一间学校体育馆里,七十个人共用一个淋浴间,而且只有冷水。Martial ArtsCombat SportsCoaching+3
3:46:18EN → 简体中文
Lex Fridman· 2026年7月28日播客 · 2 人对谈抽掉奴隶制,就没有美国内战嘉宾 Gary Gallagher · 主持 Lex Fridman1860 年,美国奴隶主名下的奴隶价值,超过了全美所有铁路和工厂的总和。Political PhilosophyLeadershipHistory
3:51:47EN → 简体中文
Lex Fridman· 2026年6月30日播客 · 2 人对谈46% 的皇帝被暴力推翻,帝国照样延续下来嘉宾 Anthony Kaldellis · 主持 Lex Fridman历史学家 Anthony Kaldellis 与 Lex Fridman 一起走过 2200 年的罗马史,并主张我们所说的拜占庭,其实就是罗马本身。Political PhilosophyGeopoliticsLeadership
2:53:42EN → 简体中文
Lex Fridman· 2026年5月29日播客 · 2 人对谈月亮一直在下落,却总也落不到地球上嘉宾 Biggest Mysteries in Physics · 主持 Lex Fridman费米实验室(Fermilab)物理学家 Don Lincoln 在与 Lex Fridman 的对谈中说,物理学的历史就是一部统一的历史;反物质(antimatter)、暗能量(dark energy)和万物理论(theory of everything)依然远在我们能做的实验之外。Quantum MechanicsScience CommunicationPhilosophy of Science