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

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

于 2020-12-05 发布
0 157
下载积分: 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 个回复

  • tct宽带信号算法
    通过聚焦的思想,将宽带信号分割到多个窄带,在聚焦到某一频点通过MUSIC算法进行分析处理,是信号处理,宽带信号处理的一个经典方法
    2020-12-08下载
    积分:1
  • 针对栅格路径规划的蚁群算法(MATLAB)
    本人研究生阶段主要学习蚁群算法,还留下一些问题,如果碰到有兴趣的人就太好不过了。本代码亲测可以使用,在MATLAB中点击main.m即可以运行。此外,本代码框架将会使你快速清楚蚁群算法基本原理。这里我给出我最后一个想实现但是还没有完成的蚁群算法的代码。主要是想应用在很大规模下的蚁群算法上,最好是5000*5000的栅格,但是本算法目前还比较慢,而且也不能得出一个最优结果。我试图在算法迭代后期加入随机初始化算子,以提高算法精度。当然,加速算法运行时间我没有加入到这个算法中。本程序对于栅格图形下的蚁群算法会是一个有用的代码。对于初学蚁群算法的,我在知乎上的一个回答可供参考:https:
    2020-12-21 20:29:08下载
    积分:1
  • SQLServer学生成绩管理系统(代码 数据库,文档
    使用java技术+sqlserver技术,简单易懂,包含有设计报告文档
    2020-12-06下载
    积分:1
  • rx560bios(三星显存)4G
    【实例简介】RX560提取BIOS 三星显存(4g)频率:1200,显存频率:7000。需外接供电.                    注意:本BIOS为公版显卡提取,只有896sp。
    2021-08-13 00:31:06下载
    积分:1
  • H3C_iNode_PC_7.3_E0538_window.zip
    是H3C公司自行设计开发出的一款智能客户端软件工具。iNode智能客户端可实现对网络的管理接入,对用户终端进行身份认证等等功能,从而大幅度提高网络的整体安全。iNode智能客户端官方版是企业用户公司必不可少的一款智能客户端工具。
    2021-05-07下载
    积分:1
  • 交大python课大作业
    本人的程序设计通识课期末大作业源代码和说明文档,欢迎大家参考,共同学习python
    2020-12-03下载
    积分:1
  • STM8驱动HT1621B
    【实例简介】基于STM8S103的HT1621B液晶驱动IC程序,代码有注释,查看和使用都比较方便。
    2021-11-01 00:33:12下载
    积分:1
  • Qt5做的高仿计算器
    用Qt5做的计算器,基本上实现了计算器该有的功能,在Qt5以上的版本能直接运行。
    2020-12-02下载
    积分:1
  • 手持触摸LCD电路图,PCB设计
    【实例简介】手持触摸LCD电路图,PCB设计
    2021-12-28 00:31:10下载
    积分:1
  • matlab自带HHT算法,最简洁的EMD分解
    matlab自带HHT算法,最简洁的EMD分解
    2020-11-29下载
    积分:1
  • 696518资源总数
  • 104349会员总数
  • 32今日下载