【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好啦,如特征表示云云. ...
随机推荐
- Python3 kmeans 聚类算法
# -*- coding: utf-8 -*- """ Created on Wed Jan 10 19:18:56 2018 @author: markli " ...
- 浅谈Spring的AOP实现-代理机制
说起Spring的AOP(Aspect-Oriented Programming)面向切面编程大家都很熟悉(Spring不是这次博文的重点),但是我先提出几个问题,看看同学们是否了解,如果了解的话可以 ...
- 利用transform的bug使fixed相对于父级定位
首先,大家都清楚,元素使用fixed之后,若不设置top与left则会相对于最近的使用定位的父元素,并位于父元素的原点位置设置top与left值时,则会相对于窗口定位.但无论如何,此时仍相对于窗口定位 ...
- Spring-Session实现Session共享入门教程
任何一种技术的出现,都是来解决特定的问题的! 本篇开始学习Spring-Session相关的一些知识学习整理,让我们开始吧! Spring-Session介绍 Spring-Session使用的场景? ...
- jQuery漏掉的东西
prop和attr的区别 attr一般都用来设置和操作元素的自定义属性的,而prop一般都是操作元素的内置属性的(尤其是表单元素的操作我们大部分都在使用prop) each 可以遍历jQuery集合中 ...
- 100BASE-TX / 100BASE-T4/100BASE-FX
IEEE标准共有以下几种:10BASE-5:粗缆.最大传输距离500米,使用AUI连接器连接或使用收发器电缆和收发器(MAU)进行连接.10BASE-2:细缆.实际传输距离为185米,使用BNC连接器 ...
- BZOJ 3812主旋律
求一个图中强联通图的个数. 一看就是容斥啦,但这种二进制高端操作还是学习一下Candy?dalao 注释在代码里 好久没更了... #include<bits/stdc++.h> usin ...
- 「BZOJ 3645」小朋友与二叉树
「BZOJ 3645」小朋友与二叉树 解题思路 令 \(G(x)\) 为关于可选大小集合的生成函数,即 \[ G(x)=\sum[i\in c ] x^i \] 令 \(F(x)\) 第 \(n\) ...
- Hystrix简单介绍
Netflix的Hystrix是一个帮助解决分布式系统交互超时处理和容错的类库,同样拥有保护系统的能力. 服务隔离 服务降级 1.服务隔离 在一个系统中,一个业务通常会依赖多个服务,且这若干个服务的调 ...
- Codeforces Round #370 (Div. 2) A. Memory and Crow 水题
A. Memory and Crow 题目连接: http://codeforces.com/contest/712/problem/A Description There are n integer ...