代码获取
克隆源码:
git clone https://github.com/tensorflow/tensorflow.git
切换到r1.4稳定分支:
cd tensorflow
git check r1.4
源码结构
tree -d -L 1 ./tensorflow
core
内核的源码,C++实现。
python
接口API,python实现。
contrib
第三方库,实验性,稳定后移入core和python文件夹中。
stream_executor
提速组件,并行化、分布式相关。
compiler
优化计算图,主要优化OP的分解组合方式,找到尽可能好的图构建方式。