登录
首页 » Others » 稀疏自编码深度学习的Matlab实现

稀疏自编码深度学习的Matlab实现

于 2020-12-05 发布
0 116
下载积分: 1 下载次数: 3

代码说明:

稀疏自编码深度学习的Matlab实现,sparse Auto coding,Matlab codetrain, m/7% CS294A/CS294W Programming Assignment Starter CodeInstructions%%%This file contains code that helps you get started ontheprogramming assignment. You will need to complete thecode in sampleIMAgEsml sparseAutoencoder Cost m and computeNumericalGradientml For the purpose of completing the assignment, you domot need tochange the code in this filecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencodtrain.m∥%%========%6% STEP 0: Here we provide the relevant parameters valuesthat willl allow your sparse autoencoder to get good filters; youdo not need to9 change the parameters belowvisibleSize =8*8; number of input unitshiddensize 25number of hidden unitssparsity Param =0.01; desired average activation ofthe hidden units7 (This was denoted by the greek alpharho, which looks like a lower-case pcurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod4/57train.,m∥in the lecture notes)1 ambda=0.0001%o weight decay parameterbeta 3%o weight of sparsity penalty term%%==:79 STEP 1: Implement sampleIMAGESAfter implementing sampleIMAGES, the display_networkcommand shouldfo display a random sample of 200 patches from the datasetpatches sampleIMAgES;display_network(patches(:, randi(size(patches, 2), 204, 1)), 8)%为产生一个204维的列向量,每一维的值为0~10000curer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod5/57train.m/v%中的随机数,说明是随机取204个 patch来显示%o Obtain random parameters thetatheta= initializeParameters ( hiddenSize, visibleSize)%%=============三三三三====================================97 STEP 2: Implement sparseAutoencoder CostYou can implement all of the components (squared errorcost, weight decay termsparsity penalty) in the cost function at once, butit may be easier to do%o it step-by-step and run gradient checking (see STEP3 after each stepWecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod6/57train. m vb suggest implementing the sparseAutoencoder Cost functionusing the following steps(a) Implement forward propagation in your neural networland implement the%squared error term of the cost function. Implementbackpropagation tocompute the derivatives. Then (using lambda=beta=(run gradient Checking%to verify that the calculations corresponding tothe squared error costterm are correctcurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod7/57train. m vl(b) Add in the weight decay term (in both the cost funcand the derivativecalculations), then re-run Gradient Checking toverify correctnessl (c) Add in the sparsity penalty term, then re-run gradiChecking toverify correctnessFeel free to change the training settings when debuggingyour%o code. (For example, reducing the training set sizecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod8/57train m vl/number of hidden units may make your code run fasterand setting betaand/or lambda to zero may be helpful for debuggingHowever, in yourfinal submission of the visualized weights, please useparameters web gave in Step 0 abovecoS七grad]sparseAutoencoderCost(theta, visibleSize,hiddensize, lambda,sparsityParam, beta,patches)二〓二二二二二二二〓二〓二〓二〓=二====〓=curer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod9/57train.m vlll96% STeP 3: Gradient CheckingHint: If you are debugging your code, performing gradienchecking on smaller modelsand smaller training sets (e. g, using only 10 trainingexamples and 1-2 hiddenunits) may speed things upl First, lets make sure your numerical gradient computationis correct for a%o simple function. After you have implemented computeNumerun the followingcheckNumericalGradientocurer:YiBinYUyuyibintony@163.com,WuYiUniversityDeep Learning, MATLAB Code for Sparse Autoencode10/57

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Tasi和张正友两种方法仿真
    标定算法的仿真程序,包括Tasi和张正友两种方法的仿真,可以实现相机镜头的畸变校正
    2020-11-30下载
    积分:1
  • WPF宝典2012源码和书(全)
    书是PDF版本,有目录!源码是全的哦!我在官网下载的!
    2020-12-12下载
    积分:1
  • 称重仪表数据读取
    C#程序语言开发,性能稳定金钟、大和、托利多等仪表表头的串口读取拆分数据成结构体,比如ST,GS,- 000740kg
    2020-06-29下载
    积分:1
  • 模拟退火算法解决0—-1背包
    应用模拟退火算法解决0-1背包问题里面有我的举例说明也有程序运行后的截图
    2021-05-06下载
    积分:1
  • matlab emd工具箱最新版
    matlab emd工具箱最新版
    2020-12-10下载
    积分:1
  • 卷积神经网络的matlab
    卷积神经网络的matlab程序,带有解析
    2020-05-23下载
    积分:1
  • PlayCamera_V3.0.0[使用GLsurfaceView预览Camera 拍照demo]
    使用GLsurfaceView预览Camera 拍照demo,详见博客:http://blog.csdn.net/yanzi1225627/article/details/33339965
    2020-11-27下载
    积分:1
  • labview精美控件
    labview的精美控件,使你的前面板更加美观!!
    2020-12-04下载
    积分:1
  • 医院选址
    医院选址问题1. 问题描述n个村庄之间的交通图可以用有向网图来表示,图中边上的权值表示从村庄i到村庄j的道路长度。现在要从这n个村庄中选择一个村庄新建一所医院,问这所医院应建在哪个村庄,才能使所有的村庄离医院都比较近?2. 基本要求(1) 建立模型,设计存储结构;(2) 设计算法完成问题求解;(3) 分析算法的时间复杂度。3. 设计思想医院选址问题实际是求有向图中心点的问题。首先定义顶点的偏心度。设图G=(V,E),对任一顶点k,称E(k)=max{d(i, k)}(i∈V)为顶点k的偏心度。显然,偏心度最小的顶点即为图G的中心点。如图7(a)所示是一个带权
    2021-01-08 18:48:51下载
    积分:1
  • Dev-C++ 5.11最新版本
    Dev-C++ 5.11是目前Dev-C++的最新版本,非常适合学习C++。
    2021-05-06下载
    积分:1
  • 696524资源总数
  • 103886会员总数
  • 81今日下载