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. [ 转载 ] Http详解

    HTTP简介 HTTP协议是Hyper Text Transfer Protocol(超文本传输协议)的缩写,是用于从万维网(WWW:World Wide Web )服务器传输超文本到本地浏览器的传送 ...

  2. P4745 B’s problem(b)

    P4745 B’s problem(b) 时间: 1000ms / 空间: 655360KiB / Java类名: Main 背景 NOIP春季系列课程 描述 题目描述 小B生活在一个很奇怪的国家里, ...

  3. Beta冲刺准备

    过去存在的问题: 界面不够美观 推荐不够人性化 代码不够符合开闭原则 我们已经做了哪些调整/改进: 本来想引入springAndroid,但看了下google的官方文档,不建议引入第三方框架:代码重构 ...

  4. 【学习笔记】python2和python3的input()

    python2中的input()只接受变量作为传入值,非变量内容会报错. >>> user=input("Enter your name:") Enter you ...

  5. Xtreme9.0 - Car Spark 动态规划

    Car Spark 题目连接: https://www.hackerrank.com/contests/ieeextreme-challenges/challenges/car-spark Descr ...

  6. BZOJ 3101: N皇后 构造

    3101: N皇后 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=3101 Description n*n的棋盘,在上面摆下n个皇后,使其 ...

  7. 使用 IntraWeb (8) - 系统模板

    我们可以自定义系统错误模板, 编辑 IWError.html 放到模板文件夹后, 它将替换默认的模板. {在主页面, 这是要模拟一个系统错误} procedure TIWForm1.IWButton1 ...

  8. 华为S5300系列交换机限制特定IP可以登录Web

    针对Web管理可能有如下需求: 1.限制某个特定IP允许访问Web 2.默认修改80端口访问 那么针对上面的设置可以有效杜绝而已Web密码暴力破解,增强交换机安全等. 实现: 1.限制特定IP登录We ...

  9. UVA 303 Pipe

    点击打开链接 题意: 求光线能达到的最大横坐标 注意光线可以和管道重合 也可以经过转折点 解法: 枚举每种光线是否能通过每个转折点的截面(线段)即可 //大白p263 #include <cma ...

  10. 怎样把XP系统装到USB里?

    怎么样在usb(usb闪存)里面装XP系统? 就是把usb当硬盘用 不买硬盘. U盘肯定装不了系统,装进去了也肯定蓝屏.为什么?因为USB得数据传输太慢,不会超过10M/S的,而你的IDE口或者SAT ...