一.为什么我们需要使用线程池技术(ThreadPool)

  线程:采用“即时创建,即时销毁”策略,即接受请求后,创建一个新的线程,执行任务,完毕后,线程退出;

  线程池:应用软件启动后,立即创建一定数量的线程,放入空闲队列;

  优缺点分析:使用线程处理多请求,低任务量问题时,不断创建、销毁线程,开销巨大;使用线程池能够减少创建销毁的开销;

二.C++11中使用unordered_map代替hash_map,另外增加了unique_ptr智能指针;(override GUARDED_BY等)

三.SWIG是一个非常优秀的开源工具,支持将C/C++代码与任何主流脚本语言相集成(包括Ruby,Perl、Tcl和Python)

四.阅读tensorflow源码

  1. https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/common_runtime/direct_session.cc

  
  代码注释写的十分详细,主要阅读部分.h文件。
 
  代码框架:
  

    core/ contains the main C++ code and runtimes.

  core/ops/ contains the "signatures" of the operations
  core/kernels/ contains the "implementations" of the operations (including CPU and CUDA kernels)
  core/framework/ contains the main abstract graph computation and other useful libraries
  core/platform/ contains code that abstracts away the platform and other imported libraries (protobuf, etc)

  TensorFlow relies heavily on the Eigen library for both CPU and GPU calculations.  Though some GPU kernels are implemented directly with CUDA code.

  bazel builds certain C++ code using gcc/clang, and certain CUDA code (files with extension .cu.cc) with nvcc.

  python/ops/ contain the core python interface
  python/kernel_tests/ contain the unit tests and lots of example code
  python/framework/ contains the python abstractions of graph, etc, a lot of which get serialized down to proto and/or get passed to swigged session calls.
  python/platform/ is similar to the C++ platform, adding lightweight wrappers for python I/O, unit testing, etc.

  contrib/*/ directories generally mimic the root tensorflow path (i.e., they have core/ops/, etc)

 
五. 有意思的DeepLearning项目网址:http://deeplearninggallery.com/
 
参考文献:

TensorFlow源码框架 杂记的更多相关文章

  1. Tensorflow源码解析1 -- 内核架构和源码结构

    1 主流深度学习框架对比 当今的软件开发基本都是分层化和模块化的,应用层开发会基于框架层.比如开发Linux Driver会基于Linux kernel,开发Android app会基于Android ...

  2. tensorflow源码分析

    前言: 一般来说,如果安装tensorflow主要目的是为了调试些小程序的话,只要下载相应的包,然后,直接使用pip install tensorflow即可. 但有时我们需要将Tensorflow的 ...

  3. Ubuntu TensorFlow 源码 Android Demo的编译运行

    Ubuntu TensorFlow 源码 Android Demo的编译运行 一. 安装 Android 的SDK和NDK SDK 配置 A:下载 国内下载地址选最新的: SDK: https://d ...

  4. 编译TensorFlow源码

      编译TensorFlow源码 参考: https://www.tensorflow.org/install/install_sources https://github.com/tensorflo ...

  5. TensorFlow源码安装

    前言 TensorFlow如果能二进制包安装,我真的不想选择自己编译,但是情况不由人,好不容易找到一台服务器,CPU不支持AVX指令集,安装的release版本运行到import tensorflow ...

  6. Tensorflow[源码安装时bazel行为解析]

    0. 引言 通过源码方式安装,并进行一定程度的解读,有助于理解tensorflow源码,本文主要基于tensorflow v1.8源码,并借鉴于如何阅读TensorFlow源码. 首先,自然是需要去b ...

  7. [图解tensorflow源码] 入门准备工作附常用的矩阵计算工具[转]

    [图解tensorflow源码] 入门准备工作 附常用的矩阵计算工具[转] Link: https://www.cnblogs.com/yao62995/p/5773142.html  tensorf ...

  8. [图解tensorflow源码] [原创] Tensorflow 图解分析 (Session, Graph, Kernels, Devices)

    TF Prepare [图解tensorflow源码] 入门准备工作 [图解tensorflow源码] TF系统概述篇 Session篇 [图解tensorflow源码] Session::Run() ...

  9. 解决Tensorflow源码安装的之后TensorBoard 无法使用的问题

    作者  cnblog 修雨轩陈 我是按照 Tensorflow 下 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3 ...

随机推荐

  1. linux系统基础之---RAID(基于centos7.4 1708)

  2. jquery优化

    选择器优化执行的速度 选择器 优先:id>元素>类 使用对象缓存:即使用变量来保存对象名,var $myDiv = $("#myDiv"):$myDiv.show(); ...

  3. sqlserver 导出数据库表结构

    https://www.cnblogs.com/miaomiaoquanfa/p/6909835.html SELECT 表名 = case when a.colorder=1 then d.name ...

  4. mysql8.0.11的坑早知道

    1.plugin caching_sha2_password could not be loaded 我在mac上用Sequel Pro连数据库的时候,会报出以上错误,这是应为8.0.11把身份认证插 ...

  5. Hadoop核心架构(1)

    在大数据的发展过程中,出现了一批专门应用与大数据的处理分析工具,如Hadoop,Hbase,Hive,Spark等,我们先从最基础的Hadoop开始进行介绍 Hadoop是apache基金会下所开发的 ...

  6. Java设计模式(20)——行为模式之命令模式(Command)

    一.概述 概念 类似C中的callback! UML简图 角色 客户端:创建具体命令,指定接收者 命令接口:声明命令的接口 具体命令:定义接收者和行为之间的弱耦合(execute执行方法) 请求者(I ...

  7. Java设计模式(7)——结构型模式之适配器模式(Adapter)

    一.概述 概念 其实,举个生活中的例子的话,适配器模式可以类比转接头,比如typeC和USB的转接头,把原本只能接typeC的接口,拓展为可以接普通USB:这里的转接头一方面需要查在typeC上,一方 ...

  8. 北京Uber优步司机奖励政策(12月24日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  9. K8S全栈容器服务如何助力企业云化创新?

    容器编排管理平台Kubernetes在实践两年多后,市场主导地位被正式确定,随着首批认证服务商的宣布,围绕着容器的应用编排部署服务已然成熟,Kubernetes开始在商业场景为企业创造价值.华为云在K ...

  10. java 泛型历史遗留问题

    Map<String,Integer> hashMap = new HashMap<String,Integer>(); hashMap.put(); // hashMap.p ...