![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TensorFlow
文章平均质量分 76
__Sunny__
学习记录生活
展开
-
[转载]tensorflow二次开发
本文转载自https://leslie-fang.github.io/2019/02/27/tensorflow%E4%BA%8C%E6%AC%A1%E5%BC%80%E5%8F%91/1. 编译方法1./configurebazel build --config=opt //tensorflow/tools/pip_package:build_pip_packagebuild出...转载 2019-09-11 11:39:32 · 24244 阅读 · 1 评论 -
Tensorflow 跨设备通信
参考 Tensorflow Cross Device CommunicationIn TensorFlow, cross-device communication is achieved using the Rendezvous interface, which has multiple different implementations, depending原创 2017-06-01 15:45:14 · 2207 阅读 · 0 评论 -
Tensorflow Device 和 DeviceContext
1. 参考TensorFlow Device Contexts, Streams and Context Switching问题部分:In the GPUDevice code, I noticed that one GPUDeviceContext is made per stream.Is the purpose of this so that原创 2017-06-01 14:26:41 · 1515 阅读 · 0 评论 -
tensorflow使用range_input_producer多线程读取数据
原文:http://blog.csdn.net/lyg5623/article/details/69387917先放关键代码:[python] view plain copyi = tf.train.range_input_producer(NUM_EXPOCHES, num_epochs=1, shuffle=False转载 2017-05-19 18:21:28 · 2495 阅读 · 0 评论 -
TensorFlow 充分理解 name / variable_scope
@原文出处: http://blog.csdn.net/Jerr__y/article/details/70809528@author: huangyongye @creat_date: 2017-04-26前言: 本例子主要介绍 name_scope 和 variable_scope 的正确使用方式,学习并理解本例之后,你就能够真正读懂 TensorFlow 的很多代转载 2017-05-19 11:29:50 · 1431 阅读 · 0 评论 -
Tensorflow cifar10_multi_gpu问题:Variable conv1/weights/ExponentialMovingAverage/ does not exist
[root@dl3 cifar10]# python cifar10_multi_gpu_train.py --num_gpus=2Traceback (most recent call last): File "cifar10_multi_gpu_train.py", line 274, in tf.app.run() File "/usr/lib/python2.7/si原创 2017-05-18 12:07:54 · 5404 阅读 · 2 评论 -
TensorFlow 学习资料
Harrison Kinsley ——PythonProgramming.net的创始人TensorFlow官方网站有相当多的文档和教程,但这些往往认为读者掌握了一些机器学习和人工智能知识。除了知道ML和AI,你也应该对Python编程语言非常熟练。因此,在开始学习如何使用TensorFlow前,首先学习更多的Python语言,而不是与机器学习直接相关的任何东西。1、假设熟转载 2017-04-27 10:41:01 · 860 阅读 · 0 评论 -
Tensorflow r0.11的tf.gfile.Glob()错误
在测试 Tensorflow 时遇到问题:通过 TF-slim 模块进行测试,使用 TFRecords 格式的数据集,训练脚本如下:pythontrain_image_classifier.py --dataset_dir=/home/docker/imagenet_tfrecords/imagenet_tfrecords/train--dataset_name=imagenet_224原创 2017-04-26 17:05:02 · 3750 阅读 · 1 评论 -
TensorFlow Time Benchmark for Googlenet (inception_v1_benchmark.py)
环境 TensorFlow v0.11KNL 7210参考内容[1] https://github.com/tensorflow/models/blob/master/tutorials/image/alexnet/alexnet_benchmark.py[2] https://github.com/tensorflow/models/blob/master/slim/net原创 2017-04-26 17:00:25 · 2326 阅读 · 0 评论 -
coordinator.py
"""Coordinator to help multiple threads stop when requested."""from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport contextlibimport s原创 2017-05-08 17:07:06 · 2164 阅读 · 0 评论 -
queue_runner_impl.py
"""Create threads to run multiple enqueue ops."""from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport threadingimport weakreffrom te原创 2017-05-08 16:39:10 · 1302 阅读 · 0 评论 -
High performance models in TensorFlow
转自:http://www.tuicool.com/articles/6jAnyiy原文:https://www.tensorflow.org/performance/performance_modelsThis document and accompanying scripts detail how to build highly scalable models th翻译 2017-05-08 11:20:50 · 3110 阅读 · 0 评论 -
input.py
"""Input pipeline.输入管线。Please see the @{$reading_data$reading data how-to}for context."""from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_func原创 2017-05-26 15:04:28 · 3615 阅读 · 1 评论 -
分布式tensorflow测试 结果及问题
分布式TensorFlow+GoogleNet+between-graph模式+异步更新先写测试结果出来后的问题,希望有经验的大牛或者正在研究的能够解答,或者提供想法和建议:1. 测试结果是否正确,从测试结果看各个worker节点的性能是不一样的,差异比较明显(相差3倍以上)。2. 最后的性能(运行时间)是如何统计(我在这里是取的平均值)3.如果按我算的平均值的结果来看原创 2017-05-04 18:06:29 · 1280 阅读 · 1 评论 -
TensorFlow学习笔记--1.0 版本的更改
主要是常用的api有一定的更改:tf.mul、tf.sub 和 tf.neg 被弃用,现在使用的是 tf.multiply、tf.subtract 和 tf.negative.可视化的api有较多改变。可以直接参考我的另一篇博客http://blog.csdn.NET/l18930738887/article/details/55000008新的版本中这些方法已转载 2017-04-23 16:02:16 · 3814 阅读 · 0 评论 -
Tensorflow ConfigProto & inter_/intra_op_parallelism_threads 整理
摘自 http://blog.csdn.net/h_jlwg6688/article/details/65441723?locationNum=12&fps=11、tensorflow ConfigProto有什么用:tf.ConfigProto一般用在创建session的时候。用来对session进行参数配置,参数包括:a)记录设备指派情况:为了获取你的 op原创 2017-05-08 15:51:05 · 9459 阅读 · 0 评论 -
Tensorflow 多线程设置
Tensorflow 多线程设置一. 通过 ConfigProto 设置多线程 (具体参数功能及描述见 tensorflow/core/protobuf/config.proto)在进行 tf.ConfigProto() 初始化时,可以通过设置相应的参数,来控制每个操作符 op 并行计算的线程个数或 session 线程池的线程数。主要涉及的参数有以下三个:1. intra_原创 2017-06-08 16:40:52 · 10244 阅读 · 2 评论 -
离线源码安装tensorflow
离线源码安装tensorflow离线源码编译简直是个坑,记录下我踩坑的过程。。参考:http://www.icode9.com/content-1-97054.htmlhttps://blog.csdn.net/conling_/article/details/72902571https://github.com/tensorflow/tensorflow/issues/15889环境...原创 2019-01-08 14:22:45 · 11632 阅读 · 4 评论 -
TensorFlow benchmarks脚本中命令参数必须加“=”
这个问题已在GitHub上提出 https://github.com/tensorflow/benchmarks/issues/132=====================================================在TensorFlow benchmarks测试时一直使用的是“--flag value”的形式,在我的印象中这样也是可以的,将value的值赋给fla原创 2018-02-07 09:56:48 · 1580 阅读 · 0 评论 -
Ubuntu16.04源码安装TensorFlow
在进行TensorFlow测试,想得到最优的性能,学习TensorFlow相关文档,源码编译会得到更好的性能Building and installing from sourceThe default TensorFlow binaries target the broadest range of hardware to make TensorFlow accessible t原创 2018-01-05 10:13:09 · 4107 阅读 · 0 评论 -
使用 virtualenv 源码安装 TensorFlow 1.4.1
由于TensorFlow1.5.0测试中多机nccl/xring时一直出错,故尝试之前版本,为了不破坏当前的环境,使用virtualenv来安装TensorFlow1.4.1,以下是安装过程1. 安装所有必备工具:apt-get install python-pip python-dev python-virtualenv2. 建立一个全新的 virtualenv 环境. 将环境建原创 2018-01-24 11:45:22 · 1315 阅读 · 0 评论 -
分布式TensorFlow批量运行worker/ps
最近在测试分布式TensorFlow,有一个问题一直很困扰我,就是worker和ps要分别在各节点上手动启动,然后参考GitHub上相关的问题及回答,好像对于distributed_replicated mode来说,每个节点上分别启动一个ps和一个worker会比较好,但是这样的话,如果是在32台机器上运行,就要执行64条命令,意味着要开64个xshell界面!(我的理解是这样不知道,若有不对,原创 2018-01-22 16:03:47 · 5373 阅读 · 2 评论 -
tensorflow imagenet数据集转化
脚本为 https://github.com/tensorflow/models/tree/master/research/slim/datasets/download_and_convert_imagenet.shset -eif [ -z "$1" ]; then echo "usage download_and_convert_imagenet.sh [data dir]"原创 2017-12-27 10:29:44 · 9201 阅读 · 3 评论 -
tensorflow获取可用GPU设备
参考:http://blog.csdn.net/weixin_35653315/article/details/71403386主要内容:使用tensorflow查询机器上是否存在可用的gpu设备使用tensorflow获取可用的gpu设备编号tensorflow对GPU设备的编码使用tensorflow查询机器上是否存在可用的gpu设备def is_gpu_ava转载 2017-12-23 16:03:40 · 4379 阅读 · 0 评论 -
centos7 安装 gcc-6.2.0
1. 下载 gcc-6.2.0 源码包,可以直接从 GCC 的FTP 上下载,随后解压 并从 contrib/download_prerequisites 文件内查看需要的依赖包[root@node1 software]# tar -zvxf gcc-6.2.0.tar.gz[root@node1 software]# cd gcc-6.2.0/[root@node1 c原创 2017-04-22 17:06:10 · 3406 阅读 · 0 评论 -
TensorFlow 数据读取模块调用过程(inception)
cifar10 的例子是针对单个 CPU/GPU 的,为考虑多个 GPU 的例子,选取了 TensorFlow 模型示例中 inception 的例子进行学习,个人感觉这个例子比 cifar10 多 GPU 的例子更好一点。首先,inception 的处理思想:1. 每一个 GPU 会用一批独立的数据计算梯度和估计值,将一大批数据分割成 split_batch_size 的数据分发到各个G原创 2017-06-21 11:41:21 · 1676 阅读 · 0 评论 -
TensorFlow数据读取模块调用过程(cifar10)
最近在看TensorFlow数据读取模块,有了一点思路,先把读取部分的调用过程写下来,以cifar10为例。入口 cifar10_train.pydef train(): with tf.Graph().as_default(): ...... # Get images and labels for CIFAR-10. # 从二进制文件中读取数据 imag原创 2017-06-15 19:52:16 · 3378 阅读 · 0 评论 -
分布式tensorflow测试 同步更新结果及问题
这一篇博客写了异步更新的结果,本篇是4个节点同步更新的测试结果,问题跟那篇博客一样。task_id=0step 5 (34.5 examples/sec; 3.708 sec/batch)step 10 (31.8 examples/sec; 4.026 sec/batch)step 10 (33.0 examples/sec; 3.880 sec/batch)step原创 2017-05-04 18:09:23 · 1832 阅读 · 0 评论 -
TypeError: concat() got an unexpected keyword argument 'axis'
在训练 tensorflow-0.11 时出现了 TypeError: concat() got an unexpected keyword argument 'axis'. 的错误输出如下:Traceback (most recent call last): File "train_image_classifier-dist.py", line 656, in tf.app原创 2017-04-22 17:13:11 · 23162 阅读 · 1 评论 -
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
在训练 tensorflow-0.11 时出现了 TypeError: Expected int32, got list containing Tensors of type '_Message' instead. 的错误输出如下:Traceback (most recent call last): File "train_image_classifier-dist.py", line原创 2017-04-22 17:10:46 · 9483 阅读 · 6 评论 -
TensorFlow架构与设计:OP本质论
作者:刘光聪 中兴通讯高级系统架构师,专注机器学习算法,分布式系统架构与优化。 原文: TensorFlow架构与设计:OP本质论---------------------------------------------------------------------------------------------------------------------------------转载 2017-03-30 11:26:26 · 3892 阅读 · 0 评论 -
TensorFlow架构与设计:图模块
作者:刘光聪 中兴通讯高级系统架构师,专注机器学习算法,分布式系统架构与优化。 原文: TensorFlow架构与设计:图模块-----------------------------------------------------------------------------------------------------------------------------转载 2017-03-30 11:24:14 · 1791 阅读 · 0 评论 -
TensorFlow架构与设计:会话生命周期
作者:刘光聪 中兴通讯高级系统架构师,专注机器学习算法,分布式系统架构与优化。 原文: TensorFlow架构与设计:会话生命周期-----------------------------------------------------------------------------------------------------------------------转载 2017-03-30 11:21:13 · 2767 阅读 · 0 评论 -
TensorFlow架构与设计:概述
TensorFlow基于数据流图,用于大规模分布式数值计算的开源框架。节点表示某种抽象的计算,边表示节点之间相互联系的张量。TensorFlow支持各种异构的平台,支持多CPU/GPU,服务器,移动设备,具有良好的跨平台的特性;TensorFlow架构灵活,能够支持各种网络模型,具有良好的通用性;此外,TensorFlow架构具有良好的可扩展性,对OP的扩展支持,Kernel特化方面表现出众。TensorFlow最初由Google大脑的研究员和工程师开发出来,用于机器学习和神经网络方面的研究,于20转载 2017-03-30 11:09:41 · 1833 阅读 · 0 评论 -
TensorFlow架构与设计:编程模型
作者:刘光聪 中兴通讯高级系统架构师,专注机器学习算法,分布式系统架构与优化。 原文:TensorFlow架构与设计:编程模型---------------------------------------------------------------------------------------------------------------------------------转载 2017-03-30 11:18:46 · 940 阅读 · 0 评论 -
tensorflow提示出错'module' object has no attribute 'pack'
转自 http://blog.csdn.net/caimouse/article/details/60465769编译旧的代码,会像下面这样提示出错:AttributeError: 'module' object has no attribute 'pack'因为TF后面的版本修改了这个函数的名称,把 tf.pack 改为 tf.stack。转载 2017-03-23 13:30:42 · 5002 阅读 · 1 评论 -
【TensorFlow】tf.nn.conv2d是怎样实现卷积的?
原文 http://blog.csdn.net/mao_xiao_feng/article/details/53444333tf.nn.conv2d是TensorFlow里面实现卷积的函数,参考文档对它的介绍并不是很详细,实际上这是搭建卷积神经网络比较核心的一个方法,非常重要tf.nn.conv2d(input, filter, strides, padding,转载 2017-03-29 11:49:20 · 487 阅读 · 0 评论 -
Tensorflow 代码解析
转自 『深度长文』Tensorflow代码解析(一)原文如下摘要2015年11月9日,Google发布深度学习框架TensorFlow并宣布开源,并迅速得到广泛关注,在图形分类、音频处理、推荐系统和自然语言处理等场景下都被大面积推广。TensorFlow系统更新快速,官方文档教程齐全,上手快速且简单易用,支持Python和C++接口。本文依据对Tensorflow(简称TF)白转载 2017-03-21 16:28:47 · 1339 阅读 · 0 评论 -
[问题记录]TensorFlow测试mnist失败
前两篇TensorFlow测试mnist示例文章上传后,csdn吞了我的图,再次测试时,出现了以下问题[test@dl1 mnist]$ python mnist_test_begin.pyI tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0原创 2017-03-21 12:39:48 · 7118 阅读 · 1 评论 -
开源软件库TensorFlow最全教程和项目列表
TensorFlow 是一个开源软件库,用于使用数据流图进行数值计算。换句话说,即是构建深度学习模型的最佳方式。本文整理了一些优秀的有关 TensorFlow 的教程和项目列表。一、教程 TensorFlow Tutorial 1 — 从基础到更有趣的 TensorFlow 应用 TensorFlow Tutorial 2 — 基于 Google TensorFlo转载 2017-03-28 17:02:09 · 3624 阅读 · 0 评论