![](https://img-blog.csdnimg.cn/20190918140129601.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
tensorflow解析
由于工作原因,需要扩展tensorflow。
头发光了你就强了
Neural Network and Machine Learning
展开
-
Tensorflow源码解析之设备分配Placer
Placer为C++类,声明在头文件:tensorflow-r1.14\tensorflow\core\common_runtime\placer.h。看注释就知道此类的功能了。// A placement algorithm that assigns the nodes of the given Graph to// devices the given DeviceSet, respecting the following constraints://// 1. Existing device原创 2020-06-10 10:05:52 · 285 阅读 · 0 评论 -
tensorlfow数据类型之reference type
a=tf.Variable(1,name=“variable_a”)print(a.dtype)在python层面上述代码产生一个int32_ref的tensor,吃a的op必须和variable_a在同一设备上,并且tensor a 和variable_a共享同一块buffer(共享buffer肯定要在同一设备上)。上述代码产生的pb图如下:我们看看read的属性:注意_class属性,loc:@Variable表示此op的输出tensor和Variable这个op共享buffer,也必须在同原创 2020-06-09 18:23:24 · 298 阅读 · 0 评论