Deep Learning(深度学习)学习笔记整理系列之(八)

深度学习笔记(二) 卷积神经网络的整体架构 阅读详情
AI摘要

本文介绍了深度学习的基础概念、发展历程及关键技术,包括特征表示、模型训练等,并探讨了其在图像、语音等领域应用前景。

Deep Learning(深度学习)学习笔记整理系列

zouxy09@qq.com

http://blog.csdn.net/zouxy09

作者:Zouxy

version 1.0 2013-04-08

声明:

1)该Deep Learning的学习系列是整理自网上很大牛和机器学习专家所无私奉献的资料的。具体引用的资料请看参考文献。具体的版本声明也参考原文献。

2)本文仅供学术交流,非商用。所以每一部分具体的参考资料并没有详细对应。如果某部分不小心侵犯了大家的利益,还望海涵,并联系博主删除。

3)本人才疏学浅,整理总结的时候难免出错,还望各位前辈不吝指正,谢谢。

4)阅读本文需要机器学习、计算机视觉、神经网络等等基础(如果没有也没关系了,没有就看看,能不能看懂,呵呵)。

5)此属于第一版本,若有错误,还需继续修正与增删。还望大家多多指点。大家都共享一点点,一起为祖国科研的推进添砖加瓦(呵呵,好高尚的目标啊)。请联系:zouxy09@qq.com

目录:

一、概述

二、背景

三、人脑视觉机理

四、关于特征

       4.1、特征表示的粒度

       4.2、初级(浅层)特征表示

       4.3、结构性特征表示

       4.4、需要有多少个特征?

五、Deep Learning的基本思想

六、浅层学习(Shallow Learning)和深度学习(Deep Learning)

七、Deep learning与Neural Network

八、Deep learning训练过程

       8.1、传统神经网络的训练方法

       8.2、deep learning训练过程

九、Deep Learning的常用模型或者方法

       9.1、AutoEncoder自动编码器

       9.2、Sparse Coding稀疏编码

       9.3、Restricted Boltzmann Machine(RBM)限制波尔兹曼机

       9.4、Deep BeliefNetworks深信度网络

       9.5、Convolutional Neural Networks卷积神经网络

十、总结与展望

十一、参考文献和Deep Learning学习资源

接上

 

十、总结与展望

1)Deep learning总结

      深度学习是关于自动学习要建模的数据的潜在(隐含)分布的多层(复杂)表达的算法。换句话来说,深度学习算法自动的提取分类需要的低层次或者高层次特征。高层次特征,一是指该特征可以分级(层次)地依赖其他特征,例如:对于机器视觉,深度学习算法从原始图像去学习得到它的一个低层次表达,例如边缘检测器,小波滤波器等,然后在这些低层次表达的基础上再建立表达,例如这些低层次表达的线性或者非线性组合,然后重复这个过程,最后得到一个高层次的表达。

       Deep learning能够得到更好地表示数据的feature,同时由于模型的层次、参数很多,capacity足够,因此,模型有能力表示大规模数据,所以对于图像、语音这种特征不明显(需要手工设计且很多没有直观物理含义)的问题,能够在大规模训练数据上取得更好的效果。此外,从模式识别特征和分类器的角度,deep learning框架将feature和分类器结合到一个框架中,用数据去学习feature,在使用中减少了手工设计feature的巨大工作量(这是目前工业界工程师付出努力最多的方面),因此,不仅仅效果可以更好,而且,使用起来也有很多方便之处,因此,是十分值得关注的一套框架,每个做ML的人都应该关注了解一下。

       当然,deep learning本身也不是完美的,也不是解决世间任何ML问题的利器,不应该被放大到一个无所不能的程度。

2)Deep learning未来

       深度学习目前仍有大量工作需要研究。目前的关注点还是从机器学习的领域借鉴一些可以在深度学习使用的方法,特别是降维领域。例如:目前一个工作就是稀疏编码,通过压缩感知理论对高维数据进行降维,使得非常少的元素的向量就可以精确的代表原来的高维信号。另一个例子就是半监督流行学习,通过测量训练样本的相似性,将高维数据的这种相似性投影到低维空间。另外一个比较鼓舞人心的方向就是evolutionary programming approaches(遗传编程方法),它可以通过最小化工程能量去进行概念性自适应学习和改变核心架构。

Deep learning还有很多核心的问题需要解决:

(1)对于一个特定的框架,对于多少维的输入它可以表现得较优(如果是图像,可能是上百万维)?

(2)对捕捉短时或者长时间的时间依赖,哪种架构才是有效的?

(3)如何对于一个给定的深度学习架构,融合多种感知的信息?

(4)有什么正确的机理可以去增强一个给定的深度学习架构,以改进其鲁棒性和对扭曲和数据丢失的不变性?

(5)模型方面是否有其他更为有效且有理论依据的深度模型学习算法?

       探索新的特征提取模型是值得深入研究的内容。此外有效的可并行训练算法也是值得研究的一个方向。当前基于最小批处理的随机梯度优化算法很难在多计算机中进行并行训练。通常办法是利用图形处理单元加速学习过程。然而单个机器GPU对大规模数据识别或相似任务数据集并不适用。在深度学习应用拓展方面,如何合理充分利用深度学习在增强传统学习算法的性能仍是目前各领域的研究重点。

 

十一、参考文献和Deep Learning学习资源(持续更新……)

       先是机器学习领域大牛的微博:@余凯_西二旗民工;@老师木;@梁斌penny;@张栋_机器学习;@邓侃;@大数据皮东;@djvu9……

(1)Deep Learning

http://deeplearning.net/

(2)Deep Learning Methods for Vision

http://cs.nyu.edu/~fergus/tutorials/deep_learning_cvpr12/

(3)Neural Network for Recognition of Handwritten Digits[Project]

http://www.codeproject.com/Articles/16650/Neural-Network-for-Recognition-of-Handwritten-Digi

(4)Training a deep autoencoder or a classifier on MNIST digits

http://www.cs.toronto.edu/~hinton/MatlabForSciencePaper.html

(5)Ersatz:deep neural networks in the cloud

http://www.ersatz1.com/

(6)Deep Learning

http://www.cs.nyu.edu/~yann/research/deep/

(7)Invited talk "A Tutorial on Deep Learning" by Dr. Kai Yu (余凯)

http://vipl.ict.ac.cn/News/academic-report-tutorial-deep-learning-dr-kai-yu

(8)CNN - Convolutional neural network class

http://www.mathworks.cn/matlabcentral/fileexchange/24291

(9)Yann LeCun's Publications

http://yann.lecun.com/exdb/publis/index.html#lecun-98

(10) LeNet-5, convolutional neural networks

http://yann.lecun.com/exdb/lenet/index.html

(11) Deep Learning 大牛Geoffrey E. Hinton's HomePage

http://www.cs.toronto.edu/~hinton/

(12)Sparse coding simulation software[Project]

http://redwood.berkeley.edu/bruno/sparsenet/

(13)Andrew Ng's homepage

http://robotics.stanford.edu/~ang/

(14)stanford deep learning tutorial

http://deeplearning.stanford.edu/wiki/index.php/UFLDL_Tutorial

(15)「深度神经网络」(deep neural network)具体是怎样工作的

http://www.zhihu.com/question/19833708?group_id=15019075#1657279

(16)A shallow understanding on deep learning

http://blog.sina.com.cn/s/blog_6ae183910101dw2z.html

(17)Bengio's Learning Deep Architectures for AI

 http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf

(18)andrew ng's talk video:

http://techtalks.tv/talks/machine-learning-and-ai-via-brain-simulations/57862/

(19)cvpr 2012 tutorial:

http://cs.nyu.edu/~fergus/tutorials/deep_learning_cvpr12/tutorial_p2_nnets_ranzato_short.pdf

(20)Andrew ng清华报告听后感

http://blog.sina.com.cn/s/blog_593af2a70101bqyo.html

(21)Kai Yu:CVPR12 Tutorial on Deep Learning Sparse Coding

(22)Honglak Lee:Deep Learning Methods for Vision

(23)Andrew Ng :Machine Learning and AI via Brain simulations

(24)Deep Learning 【2,3】

http://blog.sina.com.cn/s/blog_46d0a3930101gs5h.html

(25)deep learning这件小事……

http://blog.sina.com.cn/s/blog_67fcf49e0101etab.html

(26)Yoshua Bengio, U. Montreal:Learning Deep Architectures

(27)Kai Yu:A Tutorial on Deep Learning

(28)Marc'Aurelio Ranzato:NEURAL NETS FOR VISION

(29)Unsupervised feature learning and deep learning

http://blog.csdn.net/abcjennifer/article/details/7804962

(30)机器学习前沿热点–Deep Learning

http://elevencitys.com/?p=1854

(31)机器学习——深度学习(Deep Learning)

http://blog.csdn.net/abcjennifer/article/details/7826917

(32)卷积神经网络

http://wenku.baidu.com/view/cd16fb8302d276a200292e22.html

(33)浅谈Deep Learning的基本思想和方法

http://blog.csdn.net/xianlingmao/article/details/8478562

(34)深度神经网络

http://blog.csdn.net/txdb/article/details/6766373

(35)Google的猫脸识别:人工智能的新突破

http://www.36kr.com/p/122132.html

(36)余凯,深度学习-机器学习的新浪潮,Technical News程序天下事

http://blog.csdn.net/datoubo/article/details/8577366

(37)Geoffrey Hinton:UCLTutorial on: Deep Belief Nets

(38)Learning Deep Boltzmann Machines

http://web.mit.edu/~rsalakhu/www/DBM.html

(39)Efficient Sparse Coding Algorithm

http://blog.sina.com.cn/s/blog_62af19190100gux1.html

(40)Itamar Arel, Derek C. Rose, and Thomas P. Karnowski: Deep Machine Learning—A New Frontier in Artificial Intelligence Research

(41)Francis Quintal Lauzon:An introduction to deep learning

(42)Tutorial on Deep Learning and Applications

(43)Boltzmann神经网络模型与学习算法

http://wenku.baidu.com/view/490dcf748e9951e79b892785.html

(44)Deep Learning 和 Knowledge Graph 引爆大数据革命

http://blog.sina.com.cn/s/blog_46d0a3930101fswl.html

(45)……

 

 

深度学习入门介绍 深度学习是一种从训练数据出发,经过一个端到端(end-to-end)的模型,然后直接输出得到最终结果的一种新模式。 一般的机器学习处理流程如下: 传感器获得数据——>预处理——>特征提取——>特征选择——>推理,预测或识别。 预处理——>特征提取——>特征选择,概况起来就是特征表达,良好的特征表达,对最终算法的准确性起了非常关键的作用。 阅读详情

相关推荐

GEE AI: 利用 Satellite Embedding 语义搜索快速识别研究区目标斑块

摘要 本文介绍了一种基于Google Earth Engine的遥感语义搜索技术,利用Satellite Embedding数据集快速识别目标地物。该方法通过将光谱信息转化为高维向量,在武汉市的案例中展示了如何:1)定义研究区和样本点;2)加载预处理的Embedding数据;3)计算向量相似度;4)结合面积过滤优化结果。相比传统监督分类,该技术具有响应快速(无需模型训练)、抗季节干扰和精准界定等优势,特别适用于森林碳储量监测和土地利用检测等应用场景。文中提供了完整的GEE代码实现流程,包括样本定义、相似度计

此星光明博客 628

关于深度学习理论和架构的最新综述(参考文献)

Schmidhuber, J. Deep Learning in Neural Networks: An Overview. Neural Netw. 2015, 61, 85–117. [CrossRef] [PubMed] Bengio, Y.; LeCun, Y.; Hinton, G. Deep Learning. Nature 2015, 521, 436–444. Bengio, Y...

qq_16197337的博客 4143

从0开始写Vue项目-环境和项目搭建

什么是VueVue.js - 渐进式 JavaScript 框架 | Vue.js (vuejs.org)2.介绍与描述动态构建用户界面的渐进式JavaScript框架作者:尤雨溪3.Vue的特点遵循MVVM模式编码简洁,体积小,运行效率高,适合移动/PC端开发它本身只关注UI,可以引入其它第三方库开发项目4.与其他JS框架的关联借鉴 Angular 的模板和数据绑定技术借鉴 React 的组件化和虚拟DOM技术5.Vue周边库vue-cli:vue脚手架axios。

不愧是暮言的博客 1487

深度学习展望

学习深度学习和人工智能是一次旅程, 读完本书只是旅程的第一站。我希望你认识到这一点,并能准备好独自迈向下一步。 首先我们将概览本书的重要内容,这应该会让你回忆起已经学过的一些概念。接下来,我 们将会概述深度学习一些关键的局限性。想要正确地使用工具,你不仅应该知道它能够做什么, 还应该知道它不能做什么。最后,我会给出我对于深度学习、机器学习和人工智能这些领域未来发展的猜测和思考。如果你想从事基础研究,应该对这一部分特别感兴趣。本章最后列出了 一份资源和策略的简要清单,供你进一步学习人工智能并掌握最新进展

YouthExplorer的博客 820

行为验证码 AJ-Captcha 使用文档

AJ-Captcha验证码系统集成指南:需添加captcha-spring-boot-starter和Redis依赖,配置Redis连接。核心实现包括Redis缓存服务类CaptchaCacheRedisImpl(含设置、查询、删除验证码等方法)、SPI配置文件及Spring Boot配置类(配置验证码属性和Redis模板)。系统支持验证码生成、校验、防刷等安全功能,适用于Web应用安全验证场景。

千层冷面的博客 2130

STM32接入CH340芯片的升级电路及初始化进入升级模式(死机)问题处理

MCU-REST 在 MCU-BOOT0 处于低电平状态下,进行下拉操作,在MCU-REST 与 MCU-BOOT0 恢复正常电平时,将导致MCU死机,MCU-REST 先于 MCU-BOOT0 下拉可解决该问题;MCU-REST 在 上升沿结束时将判断 MCU-BOOT0 的状态,MCU-BOOT0 处于高电平,MCU死机,MCU-BOOT0 处于低电平 MCU 正常;

LuDvei的博客 2496

《 Deep Learning 》全文翻译 Yann LeCun, Yoshua Bengio, Geoffrey Hinton

深度学习 YannLeCun, Yoshua Bengio & Geoffrey Hinton 原文出处:YannLeCun, Yoshua Bengio & Geoffrey Hinton. Deep Learning http://www.nature.com/articles/nature14539     摘要: 深度学习是指能够令由多个处理层组成的计算机模型以...

陆羽飞的博客 1万+

EtherCAT主站SOEM -- 15 -- CIA402伺服驱动器子协议

以上就是EtherCAT主站SOEM – 15 – CIA402伺服驱动器子协议的内容。有不明白的地方欢迎留言;有建议欢迎留言,我后面编写文档好改进。创作不容,如果文档对您有帮助,记得给个赞。

常驻客栈的博客--嵌入式EtherCAT 2740

不懂代码也想学会深度学习?这本书告诉你真的很简单

​我们暂且不管深度学习是什么,深度学习有多强大。作为信息行业的杰出的工程师,首先需要知道深度学习真正带来的是什么?未来,深度学习对社会以及各个行业会带来什么影响?拥有大量深度学习人才的中国企业将会在世界上充当何种角色?深度学习又会给我们带来什么样的机遇与挑战? “路漫漫其修远兮”。深度学习需要大量的数据和庞大的计算资源,而这就将我们的视线带入 GPU 的世界。如果时至今日,你还以为英伟达(NVID...

weixin_33733810的博客 449

基于STM32设计的智能厨房环境监测报警系统_426

随着天然气、液化石油气等可燃性气体在家庭中的广泛应用,燃气泄漏所引发的安全问题日益突出。针对传统家用可燃气体报警器功能单一、信息获取受限以及缺乏远程监测能力等不足,设计了一种基于STM32单片机的家用可燃气体报警器系统。

768

仿真学习系列(四十三):Sigrity仿真之平面谐振分析

在 SIGRITY 中,平面谐振分析(Plane Resonance Analysis)是一种用于分析信号完整性(SI)问题的高级仿真方法,尤其关注于层间电磁波的传播、谐振现象和信号衰减等问题。平面谐振分析通常用于电源分配网络(PDN)、信号线和参考平面之间的相互作用。本文将详细介绍如何在 SIGRITY 中进行平面谐振分析,并提供一些实用的分析方法与步骤,帮助工程师们识别和优化可能存在的设计问题。

案例文章,高速信号 486

深度学习(Deep Learning) 学习笔记整理系列- 八

十、总结与展望 1)Deep learning总结       深度学习是关于自动学习要建模的数据的潜在(隐含)分布的多层(复杂)表达的算法。换句话来说,深度学习算法自动的提取分类需要的低层次或者高层次特征。高层次特征,一是指该特征可以分级(层次)地依赖其他特征,例如:对于机器视觉,深度学习算法从原始图像去学习得到它的一个低层次表达,例如边缘检测器,小波滤波器等,然后在这些低层次表

月秀明竹的专栏 622

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

Deep Learning(深度学习)学习笔记整理系列(八)

Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04-08 声明: 1)该Deep Learning的学习系列是整理自网上很大牛和机器学习专家所无私奉献的资料的。具体引用的资料请看参考文献。具体的版本声明也参

lcj_cjfykx的专栏 1121

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: Deep Learning(深度学习)学习笔记整理系列之(七)
下一篇: CVPR2013一些论文集合供下载(visual tracking相关)
zouxy09
博客等级 码龄16年 3万+粉丝 115原创
评论 50
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值