稀疏自编码深度学习的Matlab实现
稀疏自编码深度学习的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
- 2020-12-05下载
- 积分:1
毕业答辩 USB上位机设计
我是毕业于重庆大学通信工程学院集成电路设计与集成系统2010级学生。我的本科毕业设计题目是串口/USB接口的上位机软件设计。这是我答辩用的PPT。串口/USB接口的上位机设计1绪论(1)选题背景和研究意义工业生产和科学研究对现场数据采集、处理的需求,使得高校、便捷的上位机应用到数据采集系统。(2)国内外研究现状数据采集产品alibaba com.tn产品实物图串口儿USB接口的上位机设计2方案对比与选择(1)数据采集系统整体框图该系统主要由以下几个功能模块组成,如下图所示。SDRAM乒乓缓冲USBA模拟信号FPGA主控转换制器数据传输上位机软件外围配置系统功能模块框图(2)方案对比与选取口八USB2.0特征比较表特征插接操作性「成本传输传输速度是否需开发难度「发展性距离驱动方案不方便,体较慢,最串口积较大,需低长快达否简单接近淘汰重启230Kbps方便,小巧快,广泛普及USB20即插即用高短480Mbps是复杂前景光明数据釆集系统的关键指标和要求是精确和高速结合上表选取USB接口来进行系统中的数据传输。串口八USB接口的上位机设计3USB固件和驱动设计(1)USB芯片固件设计电复位初始化状态变量固件设计包括调用 TD Init(,使能中断主程序、初始化是否需要重枚举?是延时1.5s,重枚举子程序,重枚举否子程序,处理设一是否收到EUP包2是→分析命令,执行请求备请求子程序等主要子程序。是否产生中断挂起?是挂起处理器否是否收到唤醒信号?否/唤醒处理器调用TD_Po|()固件主程序流程图(2)UB2.0驱动设计为 Driverizard叵网Step Navigation Project Summary For微软用户Project Name= CQU USB [04441314Project NameProject Location =E: DRIVER dr3CQU USB[044413142. ProJect TypeProject Type=WDM驱动设3. Driver TypeHandle rP M reAd4. Hardware busHandle rP M] Write5. USB ResourcesHandle rP M device CoNtrol计参数配需andersDriver Tupe FUNCTIONALHardware bus= useB RegistryHardware=凵SBWv|D①44&FD1314置最终界4. Power0. WHInstallation面如下图2 Additional3. Summary所示HelBack屬Mext1 nish Cance1参数配置界面申SB接口的上位机设計4上位机软件设计上位机软件设计下图为上位机设计的流程图。开始变量定义并初始化数据处理并计算USB连接成功八否否数波形显数据保存?值是开启线程示数据再现?/诉开启采集?打开数据窗体上位机设计流程图串口闶SB接口的上位机設5调试运行整体调试重庆大学通信工程学院USB BLASTER6-FPGA JTAGJ7-FPGACyclone.I;U57FPGA+2SDRNYMUSB2AJ16Cyclone.Il调试过程CHFIu12J5RC5510 20M ADC MODULE zo 9oU58LIANGZIUSB硬件实物串口SB接口的上位机设许5调试运行(1)固件下载和驱动安装USB芯片的固件程序可通过 EZ-USB Control panel在线下载和固化,界面显示如下图所示。EZ-USB InterfaceDevice cypress Ez-USB FX2LP No ebL Clear Load Mon s EEPROM Select MonGEt DeGet Conf Get Pipes Get String= Down ade-Load Lg EEPRom URE Statvend Req Req 0x00 Value 0x0000 Index 0x0000 Length 0Dir o OUTHex Bytes CO B4 04 81 00 01 00so TranPipeLength 128Packet siBulk Trans PipeLength 64Hex BytesReset Pipe Abort Pipe File TransPipeSet IFace Interface DAltsetting 0ev立e⑩e三iPt了lEngthbDescriptorfype: 1bcdUSB: 0x0200bDevicecla33. 0xFE上 Devices1kC1a:xEFbDeviceFrotoc口LOHEEbMaxpackets立ze0:4vEndorx04B4立 aProductX613bcdDevice032001mAnufActurer. 0立adct立三e〓i卫 NUTE:上 unConEiquratior固件下载界面
- 2020-12-08下载
- 积分:1