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的更多相关文章

  1. 【deep learning学习笔记】注释yusugomori的RBM代码 --- 头文件

    百度了半天yusugomori,也不知道他是谁.不过这位老兄写了deep learning的代码,包括RBM.逻辑回归.DBN.autoencoder等,实现语言包括c.c++.java.python ...

  2. [置顶] Deep Learning 学习笔记

    一.文章来由 好久没写原创博客了,一直处于学习新知识的阶段.来新加坡也有一个星期,搞定签证.入学等杂事之后,今天上午与导师确定了接下来的研究任务,我平时基本也是把博客当作联机版的云笔记~~如果有写的不 ...

  3. Deep Learning 学习笔记(8):自编码器( Autoencoders )

    之前的笔记,算不上是 Deep Learning, 只是为理解Deep Learning 而需要学习的基础知识, 从下面开始,我会把我学习UFDL的笔记写出来 #主要是给自己用的,所以其他人不一定看得 ...

  4. 【deep learning学习笔记】Recommending music on Spotify with deep learning

    主要内容: Spotify是个类似酷我音乐的音乐站点.做个性化音乐推荐和音乐消费.作者利用deep learning结合协同过滤来做音乐推荐. 详细内容: 1. 协同过滤 基本原理:某两个用户听的歌曲 ...

  5. Neural Networks and Deep Learning学习笔记ch1 - 神经网络

    近期開始看一些深度学习的资料.想学习一下深度学习的基础知识.找到了一个比較好的tutorial,Neural Networks and Deep Learning,认真看完了之后觉得收获还是非常多的. ...

  6. paper 149:Deep Learning 学习笔记(一)

     1. 直接上手篇 台湾李宏毅教授写的,<1天搞懂深度学习> slideshare的链接: http://www.slideshare.net/tw_dsconf/ss-62245351? ...

  7. Deep Learning 学习笔记——第9章

    总览: 本章所讲的知识点包括>>>> 1.描述卷积操作 2.解释使用卷积的原因 3.描述pooling操作 4.卷积在实践应用中的变化形式 5.卷积如何适应输入数据 6.CNN ...

  8. 【Deep Learning学习笔记】Dynamic Auto-Encoders for Semantic Indexing_Mirowski_NIPS2010

    发表于NIPS2010 workshop on deep learning的一篇文章,看得半懂. 主要内容: 是针对文本表示的一种方法.文本表示可以进一步应用在文本分类和信息检索上面.通常,一篇文章表 ...

  9. 【deep learning学习笔记】最近读的几个ppt(四)

    这几个ppt都是在微博上看到的,是百度的一个员工整理的. <Deep Belief Nets>,31页的一个ppt 1. 相关背景 还是在说deep learning好啦,如特征表示云云. ...

随机推荐

  1. 学习linux-基础-操作系统结构

    操作系统结构图 物理层: CPU:( Central Processing Unit)是一块超大规模的集成电路,是一台计算机的运算核心(Core)和控制核心( Control Unit).它的功能主要 ...

  2. Nessus漏洞扫描教程之安装Nessus工具

    Nessus漏洞扫描教程之安装Nessus工具 Nessus基础知识 Nessus号称是世界上最流行的漏洞扫描程序,全世界有超过75000个组织在使用它.该工具提供完整的电脑漏洞扫描服务,并随时更新其 ...

  3. web前端实现本地存储

    当我们在提及web前端本地存储的时候,首先需要介绍一下本地化存储的概念和历史.本地化存储从来不是一个新奇的概念,因为web应用程序一直在追求的就是媲美甚至超越桌面应用程序.但是桌面应用程序一直优于we ...

  4. android中MVP模式(一) - 清风明月的专栏 - CSDN博客

    presenter 主持人.主导器 ====== 1. 明确需求,界面如下:可存,可根据id读取数据. 包结构图 2. 建立bean public class UserBean { private S ...

  5. Wannafly 22A

    题解 另g = gcd(a1,a2,a3....) 那么k * g % m的方案书就是答案 这个式子子显然是有循环节的 x * g = 0 mod m ,x * g + y * m = 0 exgcd ...

  6. MySQL Replication(Master与Slave基本原理及配置)

    MySQL Replication(Master与Slave基本原理及配置) 1.  主从mysql server的工作原理:(如图及其过程分析) 过程:   Mysql的复制(replication ...

  7. Codeforces Round #258 (Div. 2) C. Predict Outcome of the Game 水题

    C. Predict Outcome of the Game 题目连接: http://codeforces.com/contest/451/problem/C Description There a ...

  8. UVALive 6909 Kevin's Problem 数学排列组合

    Kevin's Problem 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid ...

  9. Git 忽略某个目录中的文件,同时保留这个目录

    类似的一个问题是项目根目录下可能有 logs 一类的目录, 我们希望他人把仓库 clone 下来的时候能够已经携带了这个目录, 但又不希望让这个目录中的日志文件进版本库. 之前看到一些项目用了一种比较 ...

  10. JS删除String里某个字符的方法

    关于JS删除String里的字符的方法,一般使用replace()方法.但是这个方法只会删除一次,如果需要将string里的所以字符都删除就要用到正则. 1 2 3 4 var str = " ...