![](https://img-blog.csdnimg.cn/20190830122805210.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
TensorFlow
文章平均质量分 86
tz_zs
路漫漫其修远兮,吾将上下而求索
展开
-
【安装】Windows 下 TensorFlow 的安装(tensorflow-gpu、CUDA 10.0、cuDNN v7.6.3)——2019-09-03
____tz_zs上次关于 TensorFlow 安装的文章 《【安装】Windows下 TensorFlow 的安装(包含:CUP版、GPU版、CUDA、cuDNN)》、Google 机器学习(一) 安装 Anaconda 以及 Scikit-learn 等必备库,已经是两年前所写的了。时过境迁,有些方法和注意点可能已经不再适用,后来一直在 Ubuntu 上开发,windows 上的环境一直没...原创 2020-01-06 10:59:18 · 1325 阅读 · 0 评论 -
tensorflow tf.reduce_sum
____tz_zs可理解为降维求和,返回与输入数据类型相同的降维后的结果。.tf.reduce_sum( input_tensor, axis=None, keepdims=None, name=None, reduction_indices=None, keep_dims=None).axis 可指定仅在某一维度上求和。keepdims(keep...原创 2018-07-16 15:43:06 · 712 阅读 · 0 评论 -
【转载】TensorFlow 入门必看:Google AI 实习生经验谈(非常适合 tensorflow 初学者理解框架的文章)
原文地址:http://www.sohu.com/a/238210167_473283来源:AI前线(ID:ai-front)作者:Jacob Buckman译者:王强、无明【新智元导读】本文作者Jacob来自Google AI Resident项目,他在2017年夏天开启了为期一年的Google研究型实习,在此之前他虽然有很多编程经验和机器学习经验,但没有使用过TensorFlow...转载 2018-07-02 10:13:01 · 1897 阅读 · 0 评论 -
tensorflow 计算图和张量的使用
____tz_zs学习笔记# -*- coding: utf-8 -*-"""@author: tz_zs(t3_1)计算图的使用"""import tensorflow as tfa = tf.constant([1.0, 2.0], name="a")b = tf.constant([2.0, 3.0], name="b")result = a + b# a.graph...原创 2018-01-13 13:16:02 · 1406 阅读 · 0 评论 -
tensorflow 的版本迭代以及带来的影响
____tz_zs笔记2018-03-31 TensorFlow开发者会峰会:支持Swift,更好的支持JavaScript2018-01-27 谷歌正式发布TensorFlow 1.5:终于支持CUDA 9和cuDNN 7 ps:tensorflow版本有对应支持的CUDA 和 cuDNN版本,之前就因为使用了高版本的CUDA导致GPU版本的tensorflow安装失败的问题(【安装】Windo...原创 2017-11-22 02:34:14 · 1195 阅读 · 0 评论 -
Google Developers:发布TensorFlow Lite
____tz_zsGoogle开发者博客(Google Developers):https://developers.googleblog.com/2017/11/announcing-tensorflow-lite.htmlGoogle研究博客(Google Research Blog):https://research.googleblog.com/2017/11/转载 2017-11-16 02:51:47 · 1330 阅读 · 1 评论 -
tensorflow 报错: AttributeError: module 'tensorflow' has no attribute 'xxxx'
____tz_zs用的好好的 tensorflow 突然出现:能导入tensorflow 包,但是使用任何 tensorflow 下的模块都报“不存在”的错误。如:使用 tf.Variable 创建一个变量也会报 AttributeError: module 'tensorflow' has no attribute 'Variable '。原因是 tensorflow 变成了一个没有任何内容的模...原创 2017-11-09 10:02:44 · 79439 阅读 · 7 评论 -
tf.train. string_input_producer & QueueRunner & add_queue_runner & Coordinator & start_queue_runners
____tz_zs本文中包含的方法有:tf.train.string_input_producertf.train.input_producertf.train.QueueRunnertf.train.add_queue_runnertf.train.Coordinatortf.train.start_queue_runnersstring_in原创 2017-09-14 19:48:26 · 6340 阅读 · 2 评论 -
tensorflow TFRecord 及样例
____tz_zs学习笔记来自实际问题中的数据往往有很多格式和属性,TFRecord 格式可以统一不同的原始数据格式,并更加有效地管理不同属性。TFRecord 文件中的数据都是通过 tf.train.Example Protocol Buffer 的格式存储的。以下为 tf.train.Example 的数据结构:message Example { Features ...原创 2017-09-13 13:20:00 · 848 阅读 · 0 评论 -
tensorflow 图像数据处理(二)
____tz_zs图像片段截取,图像大小调整,图像翻转以及色彩调整的整个图像预处理过程案例来源《TensorFlow实战Google深度学习框架》原图处理后的图片# -*- coding: utf-8 -*-"""@author: tz_zs的图片预处理样例"""import原创 2017-09-11 16:23:16 · 869 阅读 · 0 评论 -
tensorflow 图像数据处理(一)
____tz_zs这是关于图片的编码、解码、随机截取图像的Demo用到的方法:tf.image.draw_bounding_boxestf.image.sample_distorted_bounding_box原图式样:代码:# -*- coding: utf-8 -*-"""@author: tz_zs图片的编码、解码、随原创 2017-09-11 10:15:50 · 1929 阅读 · 0 评论 -
tf.image.sample_distorted_bounding_box
____tz_zs此函数为图像生成单个随机变形的边界框。函数输出的是可用于裁剪原始图像的单个边框。返回值为3个张量:begin,size和 bboxes。前2个张量用于 tf.slice 剪裁图像。后者可以用于 tf.image.draw_bounding_boxes 函数来画出边界框。sample_distorted_bounding_box( image_size,原创 2017-09-10 09:40:29 · 9489 阅读 · 0 评论 -
tf.image.draw_bounding_boxes
____tz_zs在一批图像上绘制边框。draw_bounding_boxes( images, boxes, name=None)images:是 [batch, height, width, depth] 形状的四维矩阵,数据类型为 float32、half 中的一种,第一个值batch是因为处理的是一组图片。boxes: 形状 [ba原创 2017-09-10 08:51:10 · 4012 阅读 · 0 评论 -
tensorflow 卷积神经网络 Inception-v3模型 迁移学习
____tz_zs小练习案例来源于 《TensorFlow实战Google深度学习框架》谷歌提供的训练好的Inception-v3模型: https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip案例使用的数据集: http://download.ten原创 2017-08-31 02:36:36 · 8953 阅读 · 16 评论 -
tensorflow 卷积神经网络 LeNet-5模型 MNIST手写体数字识别
____tz_zs小练习案例来源《TensorFlow实战Google深度学习框架》cnn/mnist_inference.py# -*- coding: utf-8 -*-"""@author: tz_zs卷积神经网络 mnist_inference.py"""import tensorflow as tf# 定义神经网络结构相关的参数INPUT_原创 2017-08-19 02:27:40 · 2325 阅读 · 2 评论 -
tensorflow 报错: Process finished with exit code -1073740791 (0xC0000409)
____tz_zs报错场景:我是在训练神经网络模型,同时运行检测的会话检测其正确率时报错(ps:在cpu版本的tensorflow上不会报错)Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 965M, pci bus id: 0000:01:00.0)could not create cudnn ha...原创 2017-08-18 18:43:33 · 7965 阅读 · 0 评论 -
tensorflow Protocol Buffer
____tz_zsProtocol Buffer 是谷歌开发的一种语言无关、平台无关、可扩展的序列化结构数据格式,在 tensorflow 中可以理解为处理结构化数据的工具,用于序列化结构化数据。关于Protocol Buffer的介绍: https://developers.google.com/protocol-buffers/docs/overviewProt原创 2017-08-03 16:54:08 · 1786 阅读 · 0 评论 -
tensorflow 持久化原理
____tz_zs tensorflow 提供tf.train.Saver类来保存和加载神经网络模型,saver.save()保存模型,saver.restore加载模型源码saver.py中定义的保存方法 def save(self, sess, save_path, global_step=N原创 2017-08-02 09:47:17 · 822 阅读 · 0 评论 -
tensorflow 报错: tensorflow.python.framework.errors_impl.NotFoundError
____tz_zs报错代码:我是持久化存储,创建文件的代码 tf.gfile.GFile("/path/to/model/combined_model.pb", "wb") 运行报错bug描述:tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a NewWriteableFile: /path/to/mo...原创 2017-08-02 06:52:38 · 69250 阅读 · 37 评论 -
tensorflow 的会话(Session)、变量的初始化、张量的计算
____tz_zs本篇为学习tensorflow为加深对计变量的初始化,张量的计算取值的理解所写的小Demo。因作者水平限制,可能有些片面或错误,欢迎指出,共同进步。"""@author: tz_zs(t3_3)关于初始化、张量的计算取值等"""import tensorflow as tfprint("探究初始化的过程")v1 = tf.Variable([1....原创 2017-07-31 21:59:24 · 7222 阅读 · 0 评论 -
tensorflow 全连接神经网络 MNIST 手写体数字识别
____tz_zs小练习案例来源《TensorFlow实战Google深度学习框架》MNIST手写体数字识别神经网络模型——版本一# -*- coding: utf-8 -*-"""@author: tz_zs(5_2)MNIST手写体数字识别"""import tensorflow as tffrom tensorflow.examples.tutori...原创 2017-07-25 21:03:26 · 3335 阅读 · 0 评论 -
tensorflow MNIST 数据集
____tz_zs关于MNIST数据集的下载和更多介绍:http://yann.lecun.com/exdb/mnist/详解 MNIST 数据集MNIST数据集的操作这里介绍的是tensorflow提供的一个用来处理MNIST数据集的类,它将会自动的下载并转化MNIST数据的格式,便于初学者学习和练习。# -*- coding: utf-8 -*-""...原创 2017-07-25 20:58:38 · 751 阅读 · 0 评论 -
tensorflow tf.nn.softmax_cross_entropy_with_logits & tf.nn.sparse_softmax_cross_entropy_with_logits
____tz_zstf.nn.sparse_softmax_cross_entropy_with_logitstensorflow官网api:https://www.tensorflow.org/api_docs/python/tf/nn/sparse_softmax_cross_entropy_with_logitssparse_softmax_cross_entropy原创 2017-07-25 20:47:39 · 14357 阅读 · 0 评论 -
tensorflow 生成随机数 tf.random_normal 和 tf.random_uniform 和 tf.truncated_normal 和 tf.random_shuffle
____tz_zs学习笔记tf.random_normal从正态分布输出随机值。random_normal(shape,mean=0.0,stddev=1.0,dtype=tf.float32,seed=None,name=None)shape:一个一维整数张量或Python数组。代表张量的形状。mean:数据类型为dtype的张量值或Python值。是原创 2017-07-23 22:18:34 · 44447 阅读 · 0 评论 -
tensorflow 报错:关于tf.initialize_all_variables已过时
____tz_zstf.initialize_all_variablesinitialize_all_variables (from tensorflow.Python.ops.variables) is deprecated and will be removed after 2017-03-02.Instructions for updating:Use `tf.global_variable...原创 2017-07-23 05:28:08 · 7869 阅读 · 0 评论 -
tensorflow 遇到的问题 The TensorFlow library wasn't compiled to use SSE instructions, but these are avail
____tz_zsThe TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.W c:\tf_jenkins\home\workspace\release-wi...原创 2017-07-22 16:48:03 · 19135 阅读 · 2 评论 -
tensorflow 滑动平均模型 ExponentialMovingAverage
____tz_zs学习笔记滑动平均模型对于采用GradientDescent或Momentum训练的神经网络的表现都有一定程度上的提升。原理:在训练神经网络时,不断保持和更新每个参数的滑动平均值,在验证和测试时,参数的值使用其滑动平均值,能有效提高神经网络的准确率。tf.train.ExponentialMovingAveragetensorflow官网地址:h原创 2017-07-21 16:02:07 · 8681 阅读 · 0 评论 -
tensorflow 变量生成 变量管理 tf.Variable、tf.get_variable、tf.variable_scope
____tz_zs学习笔记tf.Variable官网api:https://www.tensorflow.org/api_docs/python/tf/Variabledef __init__(self, initial_value=None, trainable=True, colle原创 2017-07-13 17:27:11 · 15622 阅读 · 3 评论 -
【安装】Windows 下 TensorFlow 的安装(tensorflow-gpu、CUDA 10.0、cuDNN v7.6.3)——2019-09-03
____tz_zs上一篇关于 TensorFlow 安装的文章 《【安装】Windows下 TensorFlow 的安装(包含:CUP版、GPU版、CUDA、cuDNN)》,已经是两年前所写的了。时过境迁,有些方法和注意点可能已经不再适用,后来一直在 Ubuntu 上开发,windows 上的环境一直没更新也已经太过老旧。所以干脆重新从零开始配置一套环境。值得庆幸的是,TensorFlow 官...原创 2020-01-06 10:54:19 · 692 阅读 · 1 评论 -
【安装】Windows下 TensorFlow 的安装(包含:CUP版、GPU版、CUDA、cuDNN)——更新日期 2018-05-30
____tz_zs您可以直接使用pip安装tensorflow,只需一行代码就安装好了。cpu版:pip3 install --upgrade tensorflowgpu版:pip3 install --upgrade tensorflow-gpu·但是,推荐您使用Anaconda,用Anaconda可以创建和管理虚拟环境,并能方便的安装和管理三方库,将tensor...原创 2017-07-07 21:21:11 · 20964 阅读 · 2 评论