【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好啦,如特征表示云云. ...
随机推荐
- 007.KVM虚机时间-快照管理
一 快照管理 1.1 创建快照 [root@kvm-host ~]# virsh snapshot-create vm03-centos6.8 [root@kvm-host ~]# virsh sna ...
- python、Java、大数据和Android的薪资如何?
莫名其妙,从去年年底开始,Python这个东西在中国,突然一下子就火起来了,直至现在,他的热度更是超越了java,成为软件工程师最为关注的话题.Python之所以能火起来,很大一方面是因为大数据.人工 ...
- linux学习笔记-9.查找
1.查找可执行的命令 which ls 2.查找可执行的命令和帮助的位置 whereis ls 3.查找文件(需要更新库:updatedb) locate hadoop.txt 4.从某个文件夹开始查 ...
- 自己的reset.css
复制.粘贴 /* http://www.cnblogs.com/ele-cat Reset Stylesheet v1.0.1 2018-05-08 Author: Ele-cat - http:// ...
- Wireshark数据抓包教程之Wireshark的基础知识
Wireshark数据抓包教程之Wireshark的基础知识 Wireshark的基础知识 在这个网络信息时代里,计算机安全始终是一个让人揪心的问题,网络安全则有过之而无不及.Wireshark作为国 ...
- Android处理各种触摸事件
Android里有两个类 android.view.GestureDetector android.view.GestureDetector.SimpleOnGestureListener (另外 a ...
- android 进程间通信 messenger 是什么 binder 跟 aidl 区别 intent 进程间 通讯? android 消息机制 进程间 android 进程间 可以用 handler么 messenger 与 handler 机制 messenger 机制 是不是 就是 handler 机制 或 , 是不是就是 消息机制 android messenge
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha messenger 是什么 binder 跟 aidl 区别 intent 进程间 通讯 ...
- [JZOJ4786]小a的强迫症
[JZOJ4786]小a的强迫症 题目大意: 有\(n(n\le10^5)\)种颜色的珠子,第\(i\)种颜色有\(num[i]\)个.你要把这些珠子排成一排,使得第\(i\)种颜色的最后一个珠子一定 ...
- ARM JTAG 信号 RTCK 应该如何处理?
用户在调试内嵌可综合内核的 CPU 如 ARM7TDMI-S 时,需要通过打开仿真器的自适应时钟功能. 此时,ARM仿真器根据 RTCK 时钟信号的频率,产生可用于 CPU 内核当前时钟主频的最快的 ...
- STM32F4 Alternate function mapping
#define GPIO_AF0_MCO // MCO (MCO1 and MCO2) Alternate Function mapping #define GPIO_AF0_RTC_50Hz // ...