<pre><p style="text-align: left;line-height: normal;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;margin-left: 8px;margin-right: 8px;"><span style="font-size: 12px;color: rgb(123, 127, 131);">作者 | Vardan Agarwal<br /></span></p><p style="text-align: left;line-height: normal;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;margin-left: 8px;margin-right: 8px;"><span style="font-size: 12px;color: rgb(123, 127, 131);">来自 | AI公园 编译 | ronghuaiyang</span></p>
本文仅作学术交流,如有侵权,请联系后台删除。
本文介绍了一种高效的网络模型EfficientNet,并分析了 EfficientNet B0 至B7的网络结构之间的差异。
我在一个Kaggle竞赛中翻阅notebooks,发现几乎每个人都在使用EfficientNet 作为他们的主干,而我之前从未听说过这个。
谷歌AI在这篇文章中:https://arxiv.org/abs/1905.11946介绍了它,他们试图提出一种更高效的方法,就像它的名字所建议的那样,同时改善了最新的结果。一般来说,模型设计得太宽,太深,或者分辨率太高。刚开始的时候,增加这些特性是有用的,但很快就会饱和,然后模型的参数会很多,因而效率不高。在EfficientNet中,这些特性是按更有原则的方式扩展的,也就是说,一切都是逐渐增加的。
不明白发生了什么?不要担心,一旦看到了架构,你就会明白了。但首先,让我们看看他们得到了什么结果。
由于参数的数目相当少,这个模型族是非常高效的,也提供更好的结果。现在我们知道了为什么这些可能会成为标准的预训练模型,但是缺少了一些东西。
共同之处
<section style="padding: 16px;max-width: 100%;font-size: 12px;overflow-x: auto;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;border-radius: 0px;text-align: justify;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;margin-left: 8px;margin-right: 8px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 13px;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;">!pip install tf-nightly-gpu<br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" /><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" /><span style="max-width: 100%;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> tensorflow <span style="max-width: 100%;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">as</span> tf<br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" /><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" />IMG_SHAPE = (<span style="max-width: 100%;line-height: 26px;">224</span>, <span style="max-width: 100%;line-height: 26px;">224</span>, <span style="max-width: 100%;line-height: 26px;">3</span>)<br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" />model0 = tf.keras.applications.EfficientNetB0(input_shape=IMG_SHAPE, include_top=<span style="max-width: 100%;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">False</span>, weights=<span style="max-width: 100%;color: rgb(166, 226, 46);line-height: 26px;">"imagenet"</span>)<br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" />tf.keras.utils.plot_model(model0) <span style="max-width: 100%;color: rgb(117, 113, 94);line-height: 26px;"># to draw and visualize</span><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;overflow-wrap: break-word !important;" />model0.summary() <span style="max-width: 100%;color: rgb(117, 113, 94);line-height: 26px;"># to see the list of layers and parameters</span></span></section>
-
模块1 — 这是子block的起点。 -
模块2 — 此模块用于除第一个模块外的所有7个主要模块的第一个子block的起点。 -
模块3 — 它作为跳跃连接到所有的子block。 -
模块4 — 用于将跳跃连接合并到第一个子block中。 -
模块5 — 每个子block都以跳跃连接的方式连接到之前的子block,并使用此模块进行组合。
-
子block1 — 它仅用于第一个block中的第一个子block。
-
子block2 — 它用作所有其他block中的第一个子block。 -
子block3 — 用于所有block中除第一个外的任何子block。
模型结构
EfficientNet-B0
EfficientNet-B1
EfficientNet-B2
EfficientNet-B3
EfficientNet-B4
EfficientNet-B5
EfficientNet-B6
EfficientNet-B7
<section data-brushtype="text" style="padding-right: 0em;padding-left: 0em;white-space: normal;max-width: 100%;letter-spacing: 0.544px;color: rgb(62, 62, 62);font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;widows: 1;word-spacing: 2px;caret-color: rgb(255, 0, 0);text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;color: rgb(0, 0, 0);font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 0.5px;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 0.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;">—</span></strong>完<strong style="max-width: 100%;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 0.5px;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 0.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;">—</span></strong></span></strong></span></strong></section><pre style="padding-right: 0em;padding-left: 0em;max-width: 100%;letter-spacing: 0.544px;color: rgb(62, 62, 62);widows: 1;word-spacing: 2px;caret-color: rgb(255, 0, 0);text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="margin-top: 15px;margin-bottom: 25px;max-width: 100%;opacity: 0.8;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="margin-top: 15px;margin-bottom: 25px;max-width: 100%;opacity: 0.8;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="margin-bottom: 15px;padding-right: 0em;padding-left: 0em;max-width: 100%;color: rgb(127, 127, 127);font-size: 12px;font-family: sans-serif;line-height: 25.5938px;letter-spacing: 3px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;font-family: 微软雅黑;caret-color: red;box-sizing: border-box !important;overflow-wrap: break-word !important;">为您推荐</span></strong></span></section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;max-width: 100%;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;box-sizing: border-box !important;overflow-wrap: break-word !important;">一文了解深度推荐算法的演进</section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;max-width: 100%;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;box-sizing: border-box !important;overflow-wrap: break-word !important;">干货 | 算法工程师超实用技术路线图</section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;max-width: 100%;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="font-size: 14px;">13个算法工程师必须掌握的PyTorch Tricks</span></section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;max-width: 100%;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="font-size: 14px;">吴恩达上新:生成对抗网络(GAN)专项课程</span><br /></section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;max-width: 100%;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;box-sizing: border-box !important;overflow-wrap: break-word !important;">拿到2021灰飞烟灭算法岗offer的大佬们是啥样的<span style="font-size: 14px;">?</span></section></section></section></section></section></section></section></section></section>
本篇文章来源于: 深度学习这件小事
本文为原创文章,版权归知行编程网所有,欢迎分享本文,转载请保留出处!
内容反馈