- 博客(15)
- 收藏
- 关注
原创 HW--Church numerals
The logician Alonzo Church invented a system of representing non-negative integers entirely using functions. Here are the definitions of 0, and a function that returns 1 more than its argument:
2017-07-19 04:14:54
993
转载 Validation Set
The validation data set is a set of data for the function you want to learn, which you are not directly using to train the network. You are training the network with a set of data which you call the t
2017-06-19 23:33:10
835
原创 Tensorflow---monitoring,saver
这里主要介绍两种方式来监视训练。在介绍之前先讲一下 tf.saver 。这个可以用来保存变量。使用方法如下,可以保存所有变量,也可以保存部分指定变量。# Create some variables.v1 = tf.Variable(..., name="v1")v2 = tf.Variable(..., name="v2")...# Add an op to initializ
2017-06-04 16:33:26
7194
原创 Tensorflow函数说明(4)—— variable_scope/name_scope
主要针对 tf.get_variable 来介绍共享变量的用法。tf.get_variable 与 tf.variable 的用法不同。前者在创建变量时会查名字,如果给的名字在之前已经被别的变量占用,则会报错,不会创建相应变量。而后者并不进行检查,如果有重复,则自动的修改名字,加上数字来进行区别。所以从这来看要想共享变量并不能通过使用相同的名字来调用多次 tf.get_variable 和
2017-04-07 08:18:20
5462
原创 Batch GD/Mini-batch GD/SGD/Mini-batch SGD/Online GD
Use the following loss function as an example:The parameter updating function should be:1. Batch GDIn the above function, m is the size of the whole batch, it updates parameters on the w
2017-04-03 23:28:49
728
原创 Tensorflow函数说明(3)——queue
Tensorflow 提供队列读取数据构造 batch 的方法。队列可以加快数据度的速度,先进先出等等的基本特性就不赘述了,直接介绍tensorflow 是如何做的。首先,用给的文件名列表生成一个文件名队列(file name queue)。然后,从文件名队列中,按照指定的方式按个读取单个数据。最后,再把读出的数据放入另外一个队列中,该队列 dequeue 用以构造 batch
2017-03-31 08:17:14
3742
原创 CIFAR10 代码分析详解——cifar10_input.py
这一部分代码需要留意的主要是如何构建队列,并从中读取数据的方法。from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport osfrom six.moves import xrange # pylint: disab
2017-03-31 07:41:35
10950
2
原创 Tensorflow函数说明(2)
tf.nn.conv2d 实现三维卷积,函数说明如下tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=true)input: [batch_size, in_height, in_width, in_channels]filter: [filter_height, filter_width, in_chan
2017-03-29 08:12:41
786
原创 CIFAR10 代码分析详解——cifar10.py
引入库,定义各种参数from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport osimport reimport sysimport tarfilefrom six.moves import urllibim
2017-03-28 21:19:38
13424
2
原创 Tensorflow函数说明(1)
Graph 表示可计算的图,其中包含 operation (节点) 和 tensor (边)对象。开始执行程序时会有默认的图建立,可以用 tf.get_default_graph() 来访问。添加操作到默认的图里面可以用下面的方法。c = tf.constant(4.0)assert c.graph is tf.get_default_graph()即不指明创建新图,则所有操作都加到默认的图
2017-03-24 08:52:53
879
原创 CIFAR10 代码分析详解——cifar10_train.py
先在这里种个草,开篇后慢慢补完引入各种库,并定义参数from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionfrom datetime import datetimeimport timeimport tensorflow
2017-03-24 08:30:05
4113
原创 Cross-Entropy 交叉熵
先上公式,交叉熵定义p(x) 是真正的概率分布, q(x) 是估计的概率分布. 这个评价准则是用来测量 q(x) 与 p(x)的相似程度. 在信息论里证明, 当q(x)=p(x)时, H(p,q) 达到最小值.在 Tensorflow 中, 对于某一特定图像, p(x) 是 one-hot vector ([0 0 0 1 0 0 0]), q(x) 是 softmax 层的输出.
2017-03-24 01:40:07
769
原创 local response normalization/batch normalization
local response normalization先上公式,local response normalization (lrn) 是用于数据归一化的方法。Tensorflow 中对应 tf.nn.local_response_normalization.假设输入是 [batch_size, height, width, channels], 那么lrn实际上是对某一个像素
2017-03-23 07:55:42
1512
转载 Weight Decay 权值衰减
分别转载自不同的博客:之一:在机器学习中,常常会出现overfitting,网络权值越大往往overfitting的程度越高,因此,为了避免出现overfitting,会给误差函数添加一个惩罚项,常用的惩罚项是所有权重的平方乘以一个衰减常量之和。右边项即用来惩罚大权值。权值衰减惩罚项使得权值收敛到较小的绝对值,而惩罚大的权值。从而避免overfitting的出现
2017-03-22 09:21:43
3769
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人