TensorFlow
YasinQiu
一条游向cs的ee鱼.
展开
-
[Tensorflow] 变量和作用域
tf. get_variable()why 存在?: 因为如果使用Variable的话每次都会新建变量, 但是我们希望一些变量可以重用, 所以就用到了get_variable(). 功能: 它会去搜索变量名, 有就直接用, 没有就新建. 既然用到变量名了, 就涉及到了名字域的概念, 通过不同的域来区别变量名作用域tf.Variable(): 如果检测到命名冲突, ...原创 2018-03-08 15:20:25 · 222 阅读 · 0 评论 -
[Tensorflow] MNIST源码分析
源代码地址: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/tutorials/mnistmnist.py主要功能: 构建一个完全连接(fully connected)的MINST模型推理 interface()def inference(images, hidden...原创 2018-03-08 17:09:10 · 2380 阅读 · 0 评论 -
[Tensorflow] 深层神经网络
1. 定义维基百科对深度学习的定义: 一类通过多层非线性变换对高复杂性数据建模算法的合集.2. 激活函数实现去线性化tensorflow提供了7种不同的非线性激活函数, 常见的有tf.nn.relu, tf.sigmoid, tf.tanh. 用户也可以自己定义激活函数..3. 损失函数的定义3.1 经典损失函数3.1.1 交叉熵用途: 刻画两个概率分...原创 2018-03-31 17:29:29 · 289 阅读 · 0 评论 -
[Tensorflow] MNIST数字识别问题
源码: https://github.com/caicloud/tensorflow-tutorial/blob/master/Deep_Learning_with_TensorFlow/1.4.0/Chapter05/2.%20TensorFlow%E8%AE%AD%E7%BB%83%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C/1.%20%E5%85%A8%E6%A...原创 2018-04-01 10:38:36 · 283 阅读 · 0 评论 -
[Tensorflow] 模型持久化
模型持久化1. 代码实现调用API: tf.train.Saver即可 模型一般会保存在后缀为.ckpt的文件中.保存模型示例v1 = tf.Variable(tf.random_normal([1], stddev=1, seed=1))v2 = tf.Variable(tf.random_normal([1], stddev=1, seed=1))result =...原创 2018-04-01 10:47:35 · 284 阅读 · 2 评论