Open source book: TensorFlow kernel dissection (Chinese)
作者:刘光聪
编辑:机器之心 & Amusi
This is a book that dissects how the TensorFlow kernel works, not about how to build machine learning models using TensorFlow, and not about best practices for applying TensorFlow. This book will reveal the system architecture of TensorFlow, its domain model, how it works, and its implementation patterns by way of dissecting the TensorFlow source code in order to reveal the inner knowledge.
项目链接:https://github.com/horance-liu/tensorflow-internals
In the project address, the author provides the full LaTex source files, as well as the corresponding PDFs, which the reader can download directly. This book assumes that the reader already understands the basic concepts and theories related to machine learning and the basic methodologies related to machine learning ; Also, it is assumed that the reader is familiar with programming languages such as Python, C++, etc.
本书适合于渴望深入了解 TensorFlow 内核设计,期望改善 TensorFlow 系统设计和性能优化,及其探究 TensorFlow 关键技术的设计和实现的系统架构师、AI 算法工程师、和 AI 软件工程师。
PDF下载地址:https://raw.github.com/horance-liu/tensorflow-internals/master/tensorflow-internals.pdf
阅读方式
A step-by-step approach is recommended for first-time readers of the book; for advanced users, you can select chapters of interest. When using TensorFlow for the first time, it is recommended to build TensorFlow completely from source code to get a feel for how the system is built and to straighten out the basic component libraries it relies on.
另外,推荐使用 TensorFlow 亲自实践一些具体应用,以便加深对 TensorFlow 系统行为的认识和理解,熟悉常见 API 的使用方法和工作原理。强烈推荐阅读本书的同时,阅读 TensorFlow 关键代码;关于阅读代码的最佳实践,请查阅本书附录 A 的内容。
Version Description
本书写作时,TensorFlow 稳定发布版本为 1.2。不排除本书讲解的部分 API 将来被废弃,也不保证某些系统实现在未来版本发生变化,甚至被删除。
同时,为了更直接的阐述问题的本质,书中部分代码做了局部的重构;删除了部分异常处理分支,或日志打印,甚至是某些可选参数列表。但是,这样的局部重构,不会影响读者理解系统的主要行为特征,更有利于读者掌握系统的工作原理。
同时,为了简化计算图的表达,本书中的计算图并非来自 TensorBoard,而是采用简化了的,等价的图结构。同样地,简化了的图结构,也不会降低读者对真实图结构的认识和理解。
Online Help
为了更好地与读者交流,已在 Github 上建立了勘误表,及其相关补充说明。由于个人经验与能力有限,在有限的时间内难免犯错。如果读者在阅读过程中,如果发现相关错误,请帮忙提交 Pull Request,避免他人掉入相同的陷阱之中,让知识分享变得更加通畅,更加轻松,我将不甚感激