深度学习之自编码器(3)自编码器变种

深度学习之自编码器(3)自编码器变种


 一般而言,自编码器网络训练较为稳定,但是由于损失函数是直接度量重建样本与真实样本的底层特征之间的距离,而不是评价重建样本的逼真度和多样性等抽象指标,因此在某些任务上效果一般,如图片重建,容易出现重建图片边缘模糊,逼真度相对真实图片仍有不小差距。为了尝试让自编码器学习到数据的真是分布,产生了一系列的自编码器变种网络。下面将介绍集中典型的自编码器变种模型。


1. Denoising Auto-Encoder

 为了防止神经网络记忆住输入数据的底层特征,Denoising Auto-Encoder给输入数据添加随机的噪声扰动,如给输入 x \boldsymbol x x添加采样自高斯分布的噪声 ε \varepsilon ε
x ~ = x + ε , ε ∼ N ( 0 , var ) \tilde\boldsymbol x=\boldsymbol x+ε,ε\sim\mathcal N(0,\text{var}) x~=x+ε,εN(0,var)
添加噪声后,网络需要从 x ~ \tilde\boldsymbol x x~学习到数据的真实隐藏变量 z \boldsymbol z z,并还原出原始的输入 x \boldsymbol x x,如下图所示:

Denoising自编码器示意图


 模型的优化目标为:
θ ∗ = argmin ⏟ θ  dist ( h θ 2 ( g θ 1 ( x ~ ) ) , x ) θ^*=\underbrace{\text{argmin}}_θ \ \text{dist}(h_{θ_2} (g_{θ_1} (\tilde\boldsymbol x)),\boldsymbol x) θ=θ argmin dist(hθ2(gθ1(x~)),x)


2. Dropout Auto-Encoder

 自编码器网络同样面临过拟合的风险,Dropout Auto-Encoder通过随机断开网络的连接来减少网络的表达能力,防止过拟合。Dropout Auto-Encoder实现非常简单,通过在网络层中插入Dropout层即可实现网络连接的随机断开。


3. Adversarial Auto-Encoder

 为了能够方便地从某个一致某个已知的先验分布中 p ( z ) p(\boldsymbol z) p(z)采样隐藏变量z,方便利用 p ( z ) p(\boldsymbol z) p(z)来重建输入,对抗自编码器(Adversarial Auto-Encoder)利用额外的判别器网络(Discriminator,简称D网络)来判定降维的隐藏变量 z \boldsymbol z z是否采样自先验分布 p ( z ) p(\boldsymbol z) p(z),如下图所示。判别器网络的输入为一个属于 [ 0 , 1 ] [0,1] [0,1]区间的变量,表征隐藏向量是否采样自先验分布 p ( z ) p(\boldsymbol z) p(z):所有采样自先验分布 p ( z ) p(\boldsymbol z) p(z) z \boldsymbol z z标注为真,采样自编码器的条件概率 q ( z ∣ x ) q(\boldsymbol z|\boldsymbol x) q(zx)的标注 z \boldsymbol z z为假。通过这种方式训练,处理可以重建样本,还可以约束条件概率分布 q ( z ∣ x ) q(\boldsymbol z|\boldsymbol x) q(zx)逼近先验分布 p ( z ) p(\boldsymbol z) p(z)

在这里插入图片描述

对抗自编码器


对抗自编码器是从下一章要介绍的生成对抗网络算法衍生而来,在学习完对抗生成网络后可以加深对对抗自编码器的理解。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Code provided by Ruslan Salakhutdinov and Geoff Hinton Permission is granted for anyone to copy, use, modify, or distribute this program and accompanying programs and documents for any purpose, provided this copyright notice is retained and prominently displayed, along with a note saying that the original programs are available from our web page. The programs and documents are distributed without any warranty, express or implied. As the programs were written for research purposes only, they have not been tested to the degree that would be advisable in any important application. All use of these programs is entirely at the user's own risk. How to make it work: 1. Create a separate directory and download all these files into the same directory 2. Download from http://yann.lecun.com/exdb/mnist the following 4 files: o train-images-idx3-ubyte.gz o train-labels-idx1-ubyte.gz o t10k-images-idx3-ubyte.gz o t10k-labels-idx1-ubyte.gz 3. Unzip these 4 files by executing: o gunzip train-images-idx3-ubyte.gz o gunzip train-labels-idx1-ubyte.gz o gunzip t10k-images-idx3-ubyte.gz o gunzip t10k-labels-idx1-ubyte.gz If unzipping with WinZip, make sure the file names have not been changed by Winzip. 4. Download Conjugate Gradient code minimize.m 5. Download Autoencoder_Code.tar which contains 13 files OR download each of the following 13 files separately for training an autoencoder and a classification model: o mnistdeepauto.m Main file for training deep autoencoder o mnistclassify.m Main file for training classification model o converter.m Converts raw MNIST digits into matlab format o rbm.m Training RBM with binary hidden and binary visible units o rbmhidlinear.m Training RBM with Gaussian hidden and binary visible units o backprop.m Backpropagation for fine-tuning an autoencoder o backpropclassify.m Backpropagation for classification using "encoder" network o CG_MNIST.m Conjugate Gradient optimization for fine-tuning an autoencoder o CG_CLASSIFY_INIT.m Co
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值