【deep learning学习笔记】注释yusugomori的DA代码 --- dA.h
DA就是“Denoising Autoencoders”的缩写。继续给yusugomori做注释,边注释边学习。看了一些DA的材料,基本上都在前面“转载”了。学习中间总有个疑问:DA和RBM到底啥区别?(别笑,我不是“学院派”的看Deep Learning理论,如果“顺次”看下来,可能不会有这个问题),现在了解的差不多了,详情见:【deep learning学习笔记】Autoencoder。之后,又有个疑问,DA具体的权重更新公式是怎么推导出来的?我知道是BP算法,不过具体公示的推导、偏导数的求解,没有看到哪个材料有具体的公式,所以姑且认为yusugomori的代码写的是正确的。
注释后的头文件:
// The Class of denoising auto-encoder
class dA
{
public:
int N; // the number of training samples
int n_visible; // the number of visible nodes
int n_hidden; // the number of hidden nodes
double **W; // the weight connecting visible node and hidden node
double *hbias; // the bias of hidden nodes
double *vbias; // the bias of visible nodes public:
// initialize the parameters
dA ( int, // N
int, // n_visible
int , // n_hidden
double**, // W
double*, // hbias
double* // vbias
);
~dA(); // make the input noised
void get_corrupted_input (
int*, // the original input 0-1 vector -- input
int*, // the resulted 0-1 vector gotten noised -- output
double // the p probability of noise, binomial test -- input
);
// encode process: calculate the probability output from hidden node
// p(hi|v) = sigmod ( sum_j(vj * wij) + bi), it's same with RBM
// but different from RBM, it dose not generate 0-1 state from Bernoulli distribution
void get_hidden_values (
int*, // the input from visible nodes
double* // the output of hidden nodes
);
// decode process: calculate the probability output from visiable node
// p(vi|h) = sigmod ( sum_j(hj * wij) + ci), it's same with RBM
// but different from RBM, it dose not generate 0-1 state from Bernoulli distribution
void get_reconstructed_input (
double*, // the input from hidden nodes
double* // the output reconstructed of visible nodes
);
// train the model by a single sample
void train (
int*, // the input sample from visiable node
double, // the learning rate
double // corruption_level is the probability of noise
);
// reconstruct the input sample
void reconstruct (
int*, // the input sample -- input
double* // the reconstructed value -- output
);
};
【deep learning学习笔记】注释yusugomori的DA代码 --- dA.h的更多相关文章
- 【deep learning学习笔记】注释yusugomori的RBM代码 --- 头文件
百度了半天yusugomori,也不知道他是谁.不过这位老兄写了deep learning的代码,包括RBM.逻辑回归.DBN.autoencoder等,实现语言包括c.c++.java.python ...
- [置顶]
Deep Learning 学习笔记
一.文章来由 好久没写原创博客了,一直处于学习新知识的阶段.来新加坡也有一个星期,搞定签证.入学等杂事之后,今天上午与导师确定了接下来的研究任务,我平时基本也是把博客当作联机版的云笔记~~如果有写的不 ...
- Deep Learning 学习笔记(8):自编码器( Autoencoders )
之前的笔记,算不上是 Deep Learning, 只是为理解Deep Learning 而需要学习的基础知识, 从下面开始,我会把我学习UFDL的笔记写出来 #主要是给自己用的,所以其他人不一定看得 ...
- 【deep learning学习笔记】Recommending music on Spotify with deep learning
主要内容: Spotify是个类似酷我音乐的音乐站点.做个性化音乐推荐和音乐消费.作者利用deep learning结合协同过滤来做音乐推荐. 详细内容: 1. 协同过滤 基本原理:某两个用户听的歌曲 ...
- Neural Networks and Deep Learning学习笔记ch1 - 神经网络
近期開始看一些深度学习的资料.想学习一下深度学习的基础知识.找到了一个比較好的tutorial,Neural Networks and Deep Learning,认真看完了之后觉得收获还是非常多的. ...
- paper 149:Deep Learning 学习笔记(一)
1. 直接上手篇 台湾李宏毅教授写的,<1天搞懂深度学习> slideshare的链接: http://www.slideshare.net/tw_dsconf/ss-62245351? ...
- Deep Learning 学习笔记——第9章
总览: 本章所讲的知识点包括>>>> 1.描述卷积操作 2.解释使用卷积的原因 3.描述pooling操作 4.卷积在实践应用中的变化形式 5.卷积如何适应输入数据 6.CNN ...
- 【Deep Learning学习笔记】Dynamic Auto-Encoders for Semantic Indexing_Mirowski_NIPS2010
发表于NIPS2010 workshop on deep learning的一篇文章,看得半懂. 主要内容: 是针对文本表示的一种方法.文本表示可以进一步应用在文本分类和信息检索上面.通常,一篇文章表 ...
- 【deep learning学习笔记】最近读的几个ppt(四)
这几个ppt都是在微博上看到的,是百度的一个员工整理的. <Deep Belief Nets>,31页的一个ppt 1. 相关背景 还是在说deep learning好啦,如特征表示云云. ...
随机推荐
- webview知多少?
原生页面不会用到webview,html页面内嵌APP,才会用到webview. 一.什么是webview?WebView是手机中内置了一款高性能 webkit 内核浏览器,在 SDK 中封装的一个组 ...
- BZOJ4003 JLOI2015城池攻占
用左偏树模拟攻占的过程,维护最小值,最多入和出m次,每次log复杂度. #include<bits/stdc++.h> using namespace std; ; typedef lon ...
- 【bfs】BZOJ1102- [POI2007]山峰和山谷Grz
最后刷个水,睡觉去.Bless All! [题目大意] 给定一个地图,为FGD想要旅行的区域,地图被分为n*n的网格,每个格子(i,j) 的高度w(i,j)是给定的.若两个格子有公共顶点,那么他们就是 ...
- Node.js用6行代码1个JS文件搭建一个HTTP静态服务器
Node.js是一个基于Chrome的JavaScript运行时的用户以轻松构建快速.可扩展的网络应用平台. Node.js使用事件驱动.非阻塞I/ O模型,使它轻量级.高效和完美的适用于运行在分布式 ...
- BZOJ2081 : [Poi2010]Beads
暴力枚举$k$,对于一个子串,计算它正着的hash值以及反着的hash值,取最小值得到其最终hash值. 对于$k$,一共有$\lfloor\frac{n}{k}\rfloor$个子串,计算出它们的最 ...
- HDU 5738 Eureka 统计共线的子集个数
Eureka 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5738 Description Professor Zhang draws n poin ...
- Nginx配置直接php
nginx配置文件: server { listen 80; server_name localhost; access_log /var/log/nginx/log/host.access.log ...
- Mac 10.12彻底关闭Dashboard
1.打开[系统偏好设置]. 2.点击进入[Mission Control]. 3.中间有一项[Dashboard],点击它右边的下拉菜单,选择[关闭],即可.
- [原创] 浅谈ETL系统架构如何测试?
[原创] 浅谈ETL系统架构如何测试? 来新公司已入职3个月时间,由于公司所处于互联网基金行业,基金天然固有特点,基金业务复杂,基金数据信息众多,基金经理众多等,所以大家可想一下,基民要想赚钱真不容易 ...
- SGU 104. Little shop of flowers (DP)
104. Little shop of flowers time limit per test: 0.25 sec. memory limit per test: 4096 KB PROBLEM Yo ...