7 Papers & Radios | 6年前的ResNet重回巅峰;AI辩手登上Nature封面

【论文笔记】TransFG: A Transformer Architecture for Fine-Grained Recognition TransFG简介 简介 2021年3月 由 字节跳动 在 CVPR 发表的一篇细粒度分类文章。 在CUB-200-2011上最高识别精度为 91.7% 作者团队称是将 Transformer 在细粒度分类上的首次运用。(可能是真的,不然名字早该被抢掉了😑) 作者团队在 ... 阅读详情

机器之心 & ArXiv Weekly Radiostation

参与:维度、楚航、罗若天

本周的重要论文包括IBM 海法研究院开始研发能够与人类辩论的 AI 系统——Project Debater、谷歌推出的首个完全基于 Transformer 的视频架构 TimeSformer等。

目录:

  1. Greedy Hierarchical Variational Autoencoders for Large-Scale Video Prediction

  2. Revisiting ResNets: Improved Training and Scaling Strategies

  3. An autonomous debating system

  4. Is Space-Time Attention All You Need for Video Understanding?

  5. Deep Generative Modelling: A Comparative Review of VAEs, GANs, Normalizing Flows, Energy-Based and Autoregressive Models

  6. Model Complexity of Deep Learning: A Survey

  7. Knowledge Evolution in Neural Networks

  8. ArXiv Weekly Radiostation:NLP、CV、ML 更多精选论文(附音频)

论文 1:Greedy Hierarchical Variational Autoencoders for Large-Scale Video Prediction

  • 作者:Bohan Wu、Li Fei-Fei、Chelsea Finn 等

  • 论文链接:https://arxiv.org/pdf/2103.04174.pdf

摘要:有能力泛化至多种场景的视频预测模型可以使得机器人等智能体通过规划执行多样化任务。虽然现有视频预测模型在小数据集上已经实现了满意的效果,但在大型多样化数据集上训练时会遇到严重的过拟合。在本文中,研究者引入了贪婪分层变体自动编码器(Greedy Hierarchical Variational Autoencoder, GHVAE),通过贪婪地训练分层自动编码器来学习高保真视频预测。与最新模型相比,GHVAE 在四个视频数据集上的预测性能提升了 17%-55%,在实际机器人任务上的成功率提升了 35%-40%。

GHVAE 的架构。

三模块(three-module)GHVAE 的训练流程和架构。

GHVAE 和 SVG 的视频预测测试性能对比。

推荐:该方法可以通过添加更多模块来单调地提升性能。

论文 2:Revisiting ResNets: Improved Training and Scaling Strategies

  • 作者:Irwan Bello、William Fedus、Xianzhi Du 等

  • 论文链接:https://arxiv.org/pdf/2103.07579.pdf

摘要:视觉模型的性能是架构、训练方法和扩展策略的综合结果。但是,研究往往只强调架构的变化。新架构是促成诸多进展的基础,但与新架构同时出现的通常还有训练方法和超参数变化——一些关键但很少公开的细节。此外,通过现代训练方法改进的新架构有时需要与使用过时训练方法的旧架构进行对比,例如 ImageNet 数据集上 Top-1 准确率为 76.5% 的 ResNet-50 架构。训练方法和扩展策略对流行的 ResNet 架构有哪些影响呢?近日,谷歌大脑和 UC 伯克利的研究者给出了他们的答案。

研究者调查了现今广泛使用的现代训练和正则化方法,并将其应用于 ResNet。结果表明,仅通过改进训练方法,典型 ResNet 架构的 ImageNet Top-1 准确率由 79.0% 提升至 82.2% (+3.2%)。通过两个微小且常用的架构改进:ResNetD 和 Squeeze-and-Excitation,准确率更是提升至 83.4%。

本研究中 ResNet-RS 与原版 ResNet、EfficientNet 的 Top-1 ImageNet 准确率变化曲线。

训练、正则化方法和架构变化的加性研究。

EfficientNet 和 ResNet-RS 的速度 - 准确率帕累托曲线。

推荐:ResNet 重回 SOTA 性能,改进训练方法和扩展策略就可以做到。

论文 3:An autonomous debating system

  • 作者:Noam Slonim、Yonatan Bilu、Carlos Alzate 等

  • 论文链接:https://www.nature.com/articles/s41586-021-03215-w

摘要:在 AI 打败专业国际象棋选手、围棋选手,并在多个电子游戏中大展身手之后,现在它冲着职业辩论选手来了!辩论是指对某个议题或主张,以言语 (https://zh.wikipedia.org/wiki/%E8%A8%80%E8%AA%9E) 为主要方式,为分辨不同立场之优劣而进行的一种争论方式。辩论需要精湛的口才或强大的逻辑思辩能力,且讲求反应。辩论比赛不是人人都能上,很多人甚至连吵完架都后悔没发挥好,那么 AI 呢?它能在辩论中发挥出怎样的成绩呢?

2012 年,IBM 海法研究院开始研发能够与人类辩论的 AI 系统——Project Debater。2018 年 6 月,Project Debater 打败人类专业辩手,并在 2019 年 2 月第二次亮相时,对阵 2016 年世界辩论决赛选手、欧洲辩论赛冠军 Harish Natarajan。虽然在这次人机 battle 中,Project Debater 未能获得胜利,但它展示出了优秀的构建论据以及决策能力。近日,IBM 关于 Project Debater 的一项研究登上了 Nature 封面,介绍了 Project Debater 的架构并进行了性能评估。

Project Debater 系统对比评估。

「Project Debater」与人类辩手的较量。

Project Debater 12 种底层技术的云 API。

推荐:Nature 封面:人类还在看提词器,AI 的辩论能力却出现了重大进展

论文 4:Is Space-Time Attention All You Need for Video Understanding?

  • 作者:Gedas Bertasius、Heng Wang、Lorenzo Torresani

  • 论文链接:https://arxiv.org/pdf/2102.05095.pdf

摘要:近年来,Transformer 已成为 NLP 领域中许多应用的主导方法,包括机器翻译、通用语言理解等。近日,谷歌推出了首个完全基于 Transformer 的视频架构 TimeSformer 。TimeSformer 在一些具有挑战性的动作识别基准(包括 Kinetics-400 动作识别数据集)上实现了最佳的性能。此外,与 3D 卷积神经网络(CNN)相比,TimeSformer 的训练速度大约快了 3 倍,而推断所需的计算量不足其十分之一。TimeSformer 的可扩展性使得在更长的视频片段上训练更大的模型成为可能。这为 AI 系统理解视频中更复杂的人类行为打开了大门,对需要理解人类复杂行为的 AI 应用来说是极为有益的。

研究中涉及的各种视频自注意力块。

研究中包含的五种空间 - 时间自注意力设计。

推荐:无需卷积,完全基于 Transformer 的首个视频理解架构 TimeSformer 出炉。

论文 5:Deep Generative Modelling: A Comparative Review of VAEs, GANs, Normalizing Flows, Energy-Based and Autoregressive Models

  • 作者:Sam Bond-Taylor、Adam Leach、Yang Long 等

  • 论文链接:https://arxiv.org/pdf/2103.04922v1.pdf

摘要:英国杜伦大学的研究者对变分自编码器(VAE)、生成对抗网络(GAN)、归一化流、基于能量以及自回归模型等深度生成模型进行了综述和对比,包括背后的原理以及当前 SOTA 进展和实现。

深度生成模型在训练和测试速度、参数效率、样本质量和多样性以及扩展至高分辨率数据方面的对比。

推荐:2021 最新深度生成模型综述论文。

论文 6:Model Complexity of Deep Learning: A Survey

  • 作者:Xia Hu、Lingyang Chu、Jian Pei 等

  • 论文链接:https://arxiv.org/pdf/2103.05127.pdf

摘要:模型复杂度是深度学习领域的一个基础问题,可以分为表达能力和有效模型复杂度。来自西蒙弗雷泽大学、麦克马斯特大学和微软研究院的研究者对深度学习中模型复杂度的最新研究进行了系统性综述,从模型框架、模型大小、优化过程和数据复杂度等四个方面回顾了当前研究进展。此外,他们还讨论了深度学习模型复杂度的应用,包括理解泛化能力以及模型优化、选择和设计。

表达复杂性和有效复杂性。

深度神经网络模型复杂性的细分研究。

推荐:44 页 Pdf、102 篇参考文献,裴健团队新作探索深度学习模型的复杂度。

论文 7:Knowledge Evolution in Neural Networks

  • 作者:Ahmed Taha、Abhinav Shrivastava、Larry Davis

  • 论文链接:https://arxiv.org/pdf/2103.05152v1.pdf

摘要:深度学习依赖大量标注或无标注数据的可用性。那么,问题来了:如何在相对较小的数据集上训练深度网络?为了解决这一问题,来自马里兰大学的研究者提出以一种进化启发(evolution-inspired)的训练方法来提升深度网络在较小数据集上的性能。这种知识演化方法将深度网络分为两个假说:拟合假说和重置假说。他们通过对重置假说的多次干扰,对拟合假说范畴内的知识实现迭代进化。该方法不仅可以提升性能,还能以更小的推理成本学习超薄网络。知识进化(KE)还能无缝地集成至普通和残差卷积网络,减轻过拟合和数据收集的负担。

研究者将深度网络分为拟合假说和重置假说。

减少 CNN 推理成本的 kernel-level convolutional-aware splitting (KELS) 方法。

研究中五个数据集以及相应的训练、验证和测试分割。

推荐:KE 在分类和度量学习基准方面均实现了 SOTA 结果。

ArXiv Weekly Radiostation

机器之心联合由楚航、罗若天发起的ArXiv Weekly Radiostation,在 7 Papers 的基础上,精选本周更多重要论文,包括NLP、CV、ML领域各10篇精选,并提供音频形式的论文摘要简介,详情如下:

本周 10 篇 NLP 精选论文是:

1. Learning Feature Weights using Reward Modeling for Denoising Parallel Corpora.  (from Philipp Koehn, Sanjeev Khudanpur)

2. Learning Policies for Multilingual Training of Neural Machine Translation Systems.  (from Philipp Koehn, Sanjeev Khudanpur)

3. Towards Socially Intelligent Agents with Mental State Transition and Human Utility.  (from Song-Chun Zhu)

4. Inductive Relation Prediction by BERT.  (from Xifeng Yan)

5. Evaluating Document Coherence Modelling.  (from Hang Li, Timothy Baldwin)

6. ENCONTER: Entity Constrained Progressive Sequence Generation via Insertion-based Transformer.  (from Ee-Peng Lim)

7. Advancing RNN Transducer Technology for Speech Recognition.  (from Brian Kingsbury)

8. Improving Diversity of Neural Text Generation via Inverse Probability Weighting.  (from Maosong Sun)

9. A Systematic Review of Reproducibility Research in Natural Language Processing.  (from Ehud Reiter)

10. Refining Neural Networks with Compositional Explanations.  (from Ying Chen)

本周 10 篇 CV 精选论文是:

1. You Only Look One-level Feature.  (from Xiangyu Zhang, Jian Sun)

2. Monocular Quasi-Dense 3D Object Tracking.  (from Trevor Darrell)

3. TransFG: A Transformer Architecture for Fine-grained Recognition.  (from Alan Yuille)

4. Deep Wiener Deconvolution: Wiener Meets Deep Learning for Image Deblurring.  (from Stefan Roth, Bernt Schiele)

5. PhotoApp: Photorealistic Appearance Editing of Head Portraits.  (from Hans-Peter Seidel, Hanspeter Pfister, Wojciech Matusik, Christian Theobalt)

6. Detecting Human-Object Interaction via Fabricated Compositional Learning.  (from Yu Qiao, Dacheng Tao)

7. Danish Fungi 2020 -- Not Just Another Image Recognition Dataset.  (from Jiří Matas)

8. Revisiting ResNets: Improved Training and Scaling Strategies.  (from Tsung-Yi Lin, Jonathon Shlens)

9. DivCo: Diverse Conditional Image Synthesis via Contrastive Generative Adversarial Network.  (from Xiaogang Wang)

10. DefakeHop: A Light-Weight High-Performance Deepfake Detector.  (from C.-C. Jay Kuo)

CVPR 2021 TransFG: A Transformer Architecture for Fine-grained Recognition 动机 由于类间存在着细微的差异,细粒度视觉分类(FGVC)是一项非常具有挑战性的任务,它的目标是从子类中识别出目标。 近年来的研究主要集中在如何定位最有判别力的图像区域,并依靠这些区域来提高网络捕捉细微差异的能力。这些工作都需要一个专门设计的模块来提取候选区域,并且这些选定的区域需要再次通过主干网络进行传播以进行最终的分类。此外,一些被提取得候选区域往往包含了整个目标,判别力不够。而且,这种策略不可避免地使算法流程复杂化。 近年来,视觉transformer(ViT)在传统的分类任务中显示出了强大的性能。 阅读详情

相关推荐

论文阅读笔记-TransFG: A Transformer Architecture for Fine-Grained Recognition

目录 摘要 1.引言 2.相关工作 3.方法 3.1 Vit作为特征提取器 3.1.1 图像序列化 3.1.2 patch嵌入 3.2 TransFG 结构 3.2.1 区域选择模块 摘要 细粒度视觉分类(FGVC)旨在从子类别中识别对象,这是一项非常具有挑战性的任务,因为其固有的微妙的类间差异。现有的工作主要通过重用主干网络提取检测到的识别区域的特征来解决这一问题。然而,这种策略不可避免地会使管道复杂化,并推动建议的区域包含对象的大部分部分,因此无法定位真正重要的部分。 .

XZH16047129的博客 2389

An autonomous debating system(部分内容: 该模型是如何了解语义信息的)

Project Debater’s Components Project Debater的组成部分: Wikification 将给定文本中的内容映射到维基百科中对应的概念短语 Semantic Relatedness of Wikipedia Concepts 该部分评估两个维基百科概念之间的相似性,通过构建一个大的语料库进行论点的挖掘 文中使用4亿篇报纸文章作为语料库,并将其分解成句子,根据它们所引用的维基百科概念、它们提到的实体、预定义的词汇等来索引这些句子。文中将该语料库成为LexisNex

月下独听雪 495

读论文:PredRNN: Recurrent Neural Networks for Predictive Learning using Spatiotemporal LSTMs

通过PredRNN来捕进一步实现时空预测

a44267113的博客 1231

【时空序列预测paper】PredRNN: Recurrent Neural Networks for PredictiveLearning using Spatiotemporal LSTMs

PredRNN: Recurrent Neural Networks for Predictive Learning using Spatiotemporal LSTMs

qq_46919013的博客 8932

TransFG A Transformer Architecture for Fine-Grained Recognition 【阅读笔记】

笔记

bettle_king的博客 318

【Inductive Relation Prediction】归纳关系预测相关论文总结

归纳推理:从知识图谱中自动归纳出逻辑规则进行缺失关系预测。

超级超级的博客 1939

论文阅读:TransFG: A Transformer Architecture for Fine-grained Recognition

TransFG: A Transformer Architecture for Fine-grained Recognition框架总结

Cindysxt的博客 2016

Inductive Relation Prediction by BERT

111

weixin_44466434的博客 1001

[AAAI 2022] TransFG: A Transformer Architecture for Fine-grained Recognition

[AAAI 2022] TransFG: A Transformer Architecture for Fine-grained Recognition

连理o的博客 573

51-15 视频理解串讲—TimeSformer (Is Space-Time Attention All You Need for Video Understanding) 论文精读

Facebook AI提出了一种称为TimeSformer视频理解的新架构,这个架构完全基于transformer,不使用卷积层。它通过分别对视频的时间和空间维度应用自注意力机制,能有效地捕捉动作的时空特征。

AIgraphX 2404

如何设计QR反激变换器

摘要:本文分析了基于GaN技术的PD适配器市场现状,重点探讨了准谐振反激变换器(QR Flyback)的工作原理及设计方法。文章首先介绍了反激变换器的三种工作模式(CCM、DCM、CRM/QR)及其特点,指出QR模式通过谷底开通技术能显著降低开关损耗。随后以65W适配器为例,详细阐述了变压器参数设计流程,包括匝比确定、原边电感计算和绕组匝数设计等关键步骤。文章强调QR反激变换器凭借高效率、小体积和低成本优势,已成为20W-65W PD适配器的主流拓扑方案,配合GaN技术进一步提升了功率密度和便携性。

m0_62868254的博客 1501

AMiner 会议论文推荐第四期

AMiner平台由清华大学计算机系研发,拥有我国完全自主知识产权。平台包含了超过2.3亿学术论文/专利和1.36亿学者的科技图谱,提供学者评价、专家发现、智能指派、学术地图等科技情报专业化服务。系统2006年上线,吸引了全球220个国家/地区1000多万独立IP访问,数据下载量230万次,年度访问量超过1100万,成为学术搜索和社会网络挖掘研究的重要数据和实验平台。 IJCAI 2020 论文推荐 Coloring graph neural networks for node disambiguati.

AI_Conf的博客 3767

Java写项目前的准备工作指南(技术栈选择 环境搭建和工具配置 项目结构设计与模块划分)

在开始编写一个 Java 项目之前,做好充分的准备工作是至关重要的。很多初学者可能在没有清晰规划的情况下就开始编写代码,导致项目开发进度缓慢、结构混乱,甚至最终无法按预期完成。而事实上,项目的成功不仅仅取决于编码能力,还包括项目初期的规划和准备。准备工作是确保项目顺利进行的基础,它包括技术选型、环境搭建、需求分析、团队协作及项目管理等多个方面。通过这些准备,我们可以确保项目的开发不仅高效而且有可维护性,最终能交付出高质量的代码。在项目开发过程中,异常处理是非常关键的一部分。

eternal__day的博客 1188

Monocular Quasi-Dense 3D Object Tracking 安装与使用教程

Monocular Quasi-Dense 3D Object Tracking 安装与使用教程 本教程将引导您了解并使用 Monocular Quasi-Dense 3D Object Tracking (QD-3DT),一个开源框架,它能够从单目图像序列中检测并跟踪物体,提供其全3D边界框信息。以下是关键部分的详细介绍: 1. 目录结构及介绍 QD-3DT项目的目录结构设计合理,便于开发者快速...

gitblog_00404的博客 516

AutoCAD提示找不到acdb24.dll、AcGe24.dll、AcPal.dll、AcUt.dll怎么办?

在我们安装了AutoCAD 2023版本以后,打开CAD,可能会出现dll文件丢失的情况,如下所示:1、由于找不到acdb24.dll,无法继续执行代码。重新安装程序可能解决此问题。2、由于找不到AcGe24.dll,无法继续执行代码。重新安装程序可能解决此问题。3、由于找不到AcPal.dll,无法继续执行代码。重新安装程序可能解决此问题。4、由于找不到AcUt.dll,无法继续执行代码。重新安装程序可能解决此问题。遇到AutoCAD启动系统错误,由于找不到dll文件该怎么处理呢?

huoxu369的博客 1万+

在统信UOS Server 20上踩坑记:手把手教你搞定openGauss 5.0.0企业版安装(附常见报错解决方案)

本文详细记录了在统信UOS Server 20上安装openGauss 5.0企业版的实战经验,包括环境准备、依赖库问题、目录权限、内存参数调优等常见问题的解决方案。通过伪装系统标识、建立软链接、调整内存参数等方法,成功克服国产操作系统与企业级数据库的兼容性挑战,为开发者提供了一份深度排雷指南。

weixin_28698059的博客 266

论文解读TransFG: A Transformer Architecture for Fine-grained Recognition

论文解读TransFG: A Transformer Architecture for Fine-grained Recognition 问题:Transformer还未应用在图像细分类领域中 贡献点:1.vision transformer的输入把图像切分成patch,但是是没有overlap的,文章改成切分patch用overlap(这只能算个trick) 2.Part Selection Module 通俗讲就是最后一层的输入与vision transformer不同,即把最后一层前.

pontoon‘s zone 3530

Qt Creator 启动慢、卡顿、无响应 终极解决教程

<think>我们需根据内容生成≤150字的摘要。摘要要涵盖问题、原因、解决方案和效果。注意字数限制。</think>Qt Creator启动慢、卡顿、无响应,主因是配置文件QtCreator.ini膨胀至数十MB(正常<100KB)。删除%APPDATA%\QtProject下的膨胀配置、崩溃备份及qtcreator.db即可,启动从几十秒降至几秒,内存占用恢复正常。辅助优化:关闭有道词典取词、禁用无用插件、调整clangd设置。定期检查配置文件大小,避免多版本共用配置。

Qt历险记,专注Qt技术,三年医疗设备研发经验,1年机器视觉研发经验,半年柔性传感研发经验。 77

PredRNN: Recurrent Neural Networks for Predictive Learning using Spatiotemporal LSTMs

这是一篇2017年发表在顶级期刊NIPS上的文章,作者通过发现传统RNN/LSTM网络的不足,提出了一种新的网络结构PredRNN,并且为这一网络结构设计了一种新的RNN单元(ST-LSTM)。由于博主能力有限,通过阅读原文短时间能只是领悟到PredRNN这一网络结构的思想,而并未对ST-LSTM的设计灵感有更深的体会。 下面这篇博文主要是来介绍一下什么是PredRNN,以及通过作者的设计思路...

空字符 4308

VSCode PlantUML 插件超详细教程:从安装配置到实战绘图全流程

VSCode PlantUML 插件超详细教程:从安装配置到实战绘图全流程

weixin_69237381的博客 911

Gmsh+OCC对应版本库编译

输入 GMSH_DLL_EXPORT值C:\LIB\OCCT-7_8_0-i;9、如果只是生成库文件编译gmesh工程即可生成文件在C:\LIB\Gmsh\gmsh-4.13.1-Windows64-B\Debug 下gmsh.dll、gmsh.lib、gmsh.h、gmshc.h文件;3、CMAK编译Gmsh对应OCC版本的,CMAK选择源文件路径C:\LIB\Gmsh\gmsh-4.13.1-source,生成构建文件路径C:\LIB\Gmsh\gmsh-4.13.1-Windows64-B。

u013401364的博客 412

TimeSformer泛读【Is Space-Time Attention All You Need for Video Understanding?】

TimeSformer泛读

weixin_47341656的博客 3594

PCL 欧式聚类分割【2026最新版】

PCL中欧式聚类提取算法原理详解、代码实现以及一个大自然场景地物分割提取并保存分割结果到本地文件夹的应用案例。

点云侠的博客 40万+

PredRNN: Recurrent Neural Networks for Predictive Learning using Spatiotemporal LSTMs论文解读

论文解读《PredRNN: Recurrent Neural Networks for Predictive Learning using Spatiotemporal LSTMs》 点击下载. 作者:Yunbo Wang,Mingsheng Long,Jianmin Wang,Zhifeng Gao,Phip S Yu

qq_30516823的博客 2056

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

深度学习工具包 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&#39;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 = &quot;R. B. Palm&quot;, title = &quot;Prediction as a candidate for learning deep hierarchical models of data&quot;, year = &quot;2012&quot;,}```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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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 &lt; 0.10, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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 &lt; 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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&lt;0.12, &#39;Too big error&#39;);```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(&#39;state&#39;,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 &lt; 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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 &lt; 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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 &lt; 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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 &lt; 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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 &lt; 0.1, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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 &lt; 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free &quot;Bitdeli Badge&quot;)

上一篇: 21个经典深度学习句间关系模型|代码&技巧
下一篇: PyTorch 源码解读之 cpp_extension:揭秘 C++/CUDA 算子实现和调用全流程
机器学习算法那些事
博客等级 码龄9年 1633粉丝 62原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值