[{"data":1,"prerenderedAt":348},["ShallowReactive",2],{"content-query-dYgdSo377H":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"body":13,"_type":342,"_id":343,"_source":344,"_file":345,"_stem":346,"_extension":347},"/version-updates/zh/221","zh",false,"","MindSpore新版本v0.5.0-beta解读","经过一个月的开发，MindSpore发布了v0.5.0-beta版本。MindSpore在新的里程碑上又刻下哪些值得关注的TOP特性呢？让我们一睹为快吧。","2020-06-30","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/09/21/593ce76ef9584380aa7a8cb022cd2739.png","version-updates",{"type":14,"children":15,"toc":332},"root",[16,24,30,35,40,46,51,56,61,66,71,79,84,89,94,99,112,117,126,131,136,141,146,151,158,163,170,175,184,189,198,203,208,213,218,223,228,233,238,245,250,255,260,265,274,279,288,293,303,314,325],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"mindspore新版本v050-beta解读",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"p",{},[28],{"type":23,"value":29},"大家好，每月一次的版本解读又和大家见面啦。经过一个月的开发，MindSpore发布了v0.5.0-beta版本（后简称0.5版本）。细心的小伙伴们已经发现版本名称后缀由alpha变成了beta，看来MindSpore框架经过一段时间的打磨，成熟度以及完成度又上升了一个小台阶。",{"type":17,"tag":25,"props":31,"children":32},{},[33],{"type":23,"value":34},"那么MindSpore在打怪升级路上新的小小里程碑上又刻下哪些值得关注的TOP特性呢？让我们一睹为快吧。",{"type":17,"tag":25,"props":36,"children":37},{},[38],{"type":23,"value":39},"先上宣传视频，大家能看出出现了哪些特性么？",{"type":17,"tag":41,"props":42,"children":44},"h2",{"id":43},"图算融合",[45],{"type":23,"value":43},{"type":17,"tag":25,"props":47,"children":48},{},[49],{"type":23,"value":50},"使用图算融合技术定义算子是种什么体验？",{"type":17,"tag":25,"props":52,"children":53},{},[54],{"type":23,"value":55},"图算融合，作为近期的热门，将算子与图层的表达进行统一，提供一种了简洁而统一的表达能力，作为算子的一种新的表达方式、融合方法、编译流程，让人有种通过Python写网络一样体验，让定义算子这种让人秃头的工作也变得生动鲜活起来。",{"type":17,"tag":25,"props":57,"children":58},{},[59],{"type":23,"value":60},"在中间表达中，它用基础原语组成的子图来表达算子的内部计算逻辑，打破了原有算子和图层之间的信息边界。利用统一的表达能力，图算融合实现一种更通用的更细粒度的算子融合能力，通过分析和优化现有网络计算图逻辑，对原有计算逻辑进行拆分、重组、融合，在中间表达中自动形成融合子图。",{"type":17,"tag":25,"props":62,"children":63},{},[64],{"type":23,"value":65},"在后端，这些融合子图会由AKG（Auto Kernel Generator）自动生成高性能的融合算子，且基于polyhedral实现了Auto schedule，从而实现网络整体执行时间的端到端深度优化。",{"type":17,"tag":25,"props":67,"children":68},{},[69],{"type":23,"value":70},"打开开关即可获得性能收益，例如在BERT中通过打开图算的使能开关可以获得14.8%的图算融合收益。",{"type":17,"tag":25,"props":72,"children":73},{},[74],{"type":17,"tag":75,"props":76,"children":78},"img",{"alt":7,"src":77},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/07/01/cb0b08d7232a462fa1638dd7e626a6d7.png",[],{"type":17,"tag":41,"props":80,"children":82},{"id":81},"量化训练",[83],{"type":23,"value":81},{"type":17,"tag":25,"props":85,"children":86},{},[87],{"type":23,"value":88},"越来越多的应用选择在移动设备或边缘设备上使用深度学习技术，为用户提供更加智能、人性化的服务。但是这些设备往往受到内存、性能、磁盘空间大小的因素，限制了一些网络的使用范围。",{"type":17,"tag":25,"props":90,"children":91},{},[92],{"type":23,"value":93},"这时候，量化技术无疑是解决这方面问题的利器，它能在不明显降低精度的情况下，把模型尺寸减低为原来的25%~40%，同时能减少模型内存占用，加快模型推理速度，降低功耗等。",{"type":17,"tag":25,"props":95,"children":96},{},[97],{"type":23,"value":98},"0.5版本，MindSpore也上线了量化训练部分，用户可以使用MindSpore进行量化训练。官方也在Model Zoo中提供了部分已经实现好的量化脚本。不过端侧量化推理部分还未正式上线，感兴趣的同学可以移步MindSpore gitee上的社区，点watch，就可以获取社区最新的开发进度。",{"type":17,"tag":25,"props":100,"children":101},{},[102,104],{"type":23,"value":103},"Gitee社区：",{"type":17,"tag":105,"props":106,"children":110},"a",{"href":107,"rel":108},"https://gitee.com/mindspore/mindspore",[109],"nofollow",[111],{"type":23,"value":107},{"type":17,"tag":25,"props":113,"children":114},{},[115],{"type":23,"value":116},"教程链接：",{"type":17,"tag":25,"props":118,"children":119},{},[120],{"type":17,"tag":105,"props":121,"children":124},{"href":122,"rel":123},"https://www.mindspore.cn/tutorial/zh-CN/r0.5/advanced_use/aware_quantization.html",[109],[125],{"type":23,"value":122},{"type":17,"tag":41,"props":127,"children":129},{"id":128},"混合异构",[130],{"type":23,"value":128},{"type":17,"tag":25,"props":132,"children":133},{},[134],{"type":23,"value":135},"MindSpore 0.5版本上线了混合异构特性，即支持网络中部分算子跑在Host端，部分算子跑在Device端。在一些网络执行过程中需要用到大量的内存，而Device内存无法满足训练要求，有了Host/Device异构执行，我们可以将操作大数据的算子设置在Host执行，从而解决网络无法在纯Device端训练的问题。",{"type":17,"tag":25,"props":137,"children":138},{},[139],{"type":23,"value":140},"如Wide&Deep的典型网络，当Embedding Table大到无法装入Device内存时，我们可以将操作EmbeddingTable的Lookup算子及优化器放到Host端执行以满足wide&deep大规模权重训练的要求。",{"type":17,"tag":41,"props":142,"children":144},{"id":143},"图神经网络",[145],{"type":23,"value":143},{"type":17,"tag":25,"props":147,"children":148},{},[149],{"type":23,"value":150},"近两年，图神经网络的研究成为一个热门方向，在社交网络、知识图谱、推荐系统，生命科学等领域有广泛的应用场景；MindSpore新版本可支持图神经网络的训练，最典型的GCN和GAT网络在Cora和Citeseer数据集上做混合精度训练，平均精度如下。",{"type":17,"tag":25,"props":152,"children":153},{},[154],{"type":17,"tag":75,"props":155,"children":157},{"alt":7,"src":156},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/07/01/790ef60a6e904596a408fb34271f7f87.png",[],{"type":17,"tag":25,"props":159,"children":160},{},[161],{"type":23,"value":162},"下图是Cora数据集经过GCN训练后的节点特征的t-SNE结果。",{"type":17,"tag":25,"props":164,"children":165},{},[166],{"type":17,"tag":75,"props":167,"children":169},{"alt":7,"src":168},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/07/01/86c546bd99e841d99b2f7ec7582f25b3.gif",[],{"type":17,"tag":25,"props":171,"children":172},{},[173],{"type":23,"value":174},"GAT：",{"type":17,"tag":25,"props":176,"children":177},{},[178],{"type":17,"tag":105,"props":179,"children":182},{"href":180,"rel":181},"https://gitee.com/mindspore/mindspore/tree/r0.5/model_zoo/gat",[109],[183],{"type":23,"value":180},{"type":17,"tag":25,"props":185,"children":186},{},[187],{"type":23,"value":188},"GCN：",{"type":17,"tag":25,"props":190,"children":191},{},[192],{"type":17,"tag":105,"props":193,"children":196},{"href":194,"rel":195},"https://gitee.com/mindspore/mindspore/tree/r0.5/model_zoo/gcn",[109],[197],{"type":23,"value":194},{"type":17,"tag":41,"props":199,"children":201},{"id":200},"可视化性能分析工具",[202],{"type":23,"value":200},{"type":17,"tag":25,"props":204,"children":205},{},[206],{"type":23,"value":207},"MindSpore可视化组件（MindInsight）更新了系统化的性能分析工具——Profiler，大家能够使用它来帮助理解、分析、调试并优化神经网络的性能。",{"type":17,"tag":25,"props":209,"children":210},{},[211],{"type":23,"value":212},"使用Profiler可以：",{"type":17,"tag":25,"props":214,"children":215},{},[216],{"type":23,"value":217},"l方便地在训练脚本中启动、停止Profiler功能，收集性能分析数据；",{"type":17,"tag":25,"props":219,"children":220},{},[221],{"type":23,"value":222},"l查看训练的迭代动向（指step间隔、前向/反向计算、AllReduce等各阶段时间占比）统计信息，快速定位性能瓶颈所在的阶段；",{"type":17,"tag":25,"props":224,"children":225},{},[226],{"type":23,"value":227},"l分析神经网络中算子的执行性能，包括单算子性能分析和算子类型性能分析；",{"type":17,"tag":25,"props":229,"children":230},{},[231],{"type":23,"value":232},"l分析训练数据准备(MindData)阶段的性能，定位数据算子的瓶颈所在；",{"type":17,"tag":25,"props":234,"children":235},{},[236],{"type":23,"value":237},"l查看训练timeline，分析stream/task在Ascend芯片上的执行序列和执行时间。",{"type":17,"tag":25,"props":239,"children":240},{},[241],{"type":17,"tag":75,"props":242,"children":244},{"alt":7,"src":243},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/07/01/18c469b3a20a46c0b2fcde4258b48c1e.png",[],{"type":17,"tag":41,"props":246,"children":248},{"id":247},"总结",[249],{"type":23,"value":247},{"type":17,"tag":25,"props":251,"children":252},{},[253],{"type":23,"value":254},"以上诚意满满的内容就是MindSpore 0.5版本的TOP新特性了。完整的版本更新信息，欢迎查阅RELEASE文档。",{"type":17,"tag":25,"props":256,"children":257},{},[258],{"type":23,"value":259},"顺带提一句，我们上线了资源页面，把近期的学习资料都罗列了一遍，方便大家查询获取，欢迎大家移步获取使用。那么，我们下个月再见。",{"type":17,"tag":25,"props":261,"children":262},{},[263],{"type":23,"value":264},"RELEASE文档：",{"type":17,"tag":25,"props":266,"children":267},{},[268],{"type":17,"tag":105,"props":269,"children":272},{"href":270,"rel":271},"https://gitee.com/mindspore/mindspore/blob/r0.5/RELEASE.md",[109],[273],{"type":23,"value":270},{"type":17,"tag":25,"props":275,"children":276},{},[277],{"type":23,"value":278},"官网资源页面：",{"type":17,"tag":25,"props":280,"children":281},{},[282],{"type":17,"tag":105,"props":283,"children":286},{"href":284,"rel":285},"https://www.mindspore.cn/resources/",[109],[287],{"type":23,"value":284},{"type":17,"tag":25,"props":289,"children":290},{},[291],{"type":23,"value":292},"最后，非常欢迎大家下载并体验MindSpore，参与到MindSpore开源社区建设中来。",{"type":17,"tag":25,"props":294,"children":295},{},[296,298],{"type":23,"value":297},"Gitee：",{"type":17,"tag":105,"props":299,"children":301},{"href":107,"rel":300},[109],[302],{"type":23,"value":107},{"type":17,"tag":25,"props":304,"children":305},{},[306,308],{"type":23,"value":307},"GitHub：",{"type":17,"tag":105,"props":309,"children":312},{"href":310,"rel":311},"https://github.com/mindspore-ai/mindspore",[109],[313],{"type":23,"value":310},{"type":17,"tag":25,"props":315,"children":316},{},[317,319],{"type":23,"value":318},"论坛：",{"type":17,"tag":105,"props":320,"children":323},{"href":321,"rel":322},"https://bbs.huaweicloud.com/forum/forum-1076-1.html",[109],[324],{"type":23,"value":321},{"type":17,"tag":25,"props":326,"children":327},{},[328],{"type":17,"tag":75,"props":329,"children":331},{"alt":7,"src":330},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/07/01/7307587e82eb45db9d1c1e9fb43e30ec.jpg",[],{"title":7,"searchDepth":333,"depth":333,"links":334},4,[335,337,338,339,340,341],{"id":43,"depth":336,"text":43},2,{"id":81,"depth":336,"text":81},{"id":128,"depth":336,"text":128},{"id":143,"depth":336,"text":143},{"id":200,"depth":336,"text":200},{"id":247,"depth":336,"text":247},"markdown","content:version-updates:zh:221.md","content","version-updates/zh/221.md","version-updates/zh/221","md",1776506144943]