第8章現代の畳み込みニューラルネットワーク
8.8.3. RegNet8.8.3 RegNet
The resulting design space consists of simple networks following easy-to-interpret design principles:
英語のヒント
こうしてできるの設計空間は、解釈しやすい設計原理に従う単純なネットワークからなる。
- Share the bottleneck ratio for all stages ;
英語のヒント
すべての段でボトルネック比を共有する。 - Share the group width for all stages ;
英語のヒント
すべての段でグループの幅を共有する。 - Increase network width across stages: ;
英語のヒント
段を追ってネットワークの幅を増やす:。 - Increase network depth across stages: .
英語のヒント
段を追ってネットワークの深さを増やす:。
This leaves us with a final set of choices: how to pick the specific values for the above parameters of the eventual design space. By studying the best-performing networks from the distribution in one can observe the following: the width of the network ideally increases linearly with the block index across the network, i.e., , where is the block index and slope . Given that we get to choose a different block width only per stage, we arrive at a piecewise constant function, engineered to match this dependence. Furthermore, experiments also show that a bottleneck ratio of performs best, i.e., we are advised not to use bottlenecks at all.
英語のヒント
これで、最後の選択の組が残る。最終的なの設計空間で、上のパラメータの具体的な値をどう選ぶかである。の分布から最も性能のよいネットワークを調べると、次のことがわかる。ネットワークの幅は、理想的にはネットワーク全体でブロックの番号とともに線形に増える。つまりである。ここで、はブロックの番号、傾きはである。違うブロックの幅を選べるのは段ごとだけなので、この依存関係に合うように作り込んだ、区分的に一定の関数にたどり着く。さらに、実験からは、ボトルネック比はが最もよいこともわかる。つまり、ボトルネックはまったく使わないほうがよい。
We recommend the interested reader reviews further details in the design of specific networks for different amounts of computation by perusing Radosavovic et al. (2020). For instance, an effective 32-layer RegNetX variant is given by (no bottleneck), (group width is 16), and channels for the first and second stage, respectively, chosen to be and blocks deep. The astonishing insight from the design is that it still applies, even when investigating networks at a larger scale. Even better, it even holds for Squeeze-and-Excitation (SE) network designs (RegNetY) that have a global channel activation (Hu et al., 2018).
英語のヒント
興味のある読者には、Radosavovic et al. (2020)を読み込んで、計算量の違いに応じた具体的なネットワークの設計のさらなる詳細を確かめることを勧める。たとえば、効果的な32層のRegNetXの変種は、(ボトルネックなし)、(グループの幅は16)、1段目と2段目のチャネルがそれぞれとで、深さはそれぞれとブロックに選ばれる。この設計からの驚くべき洞察は、もっと大きな規模のネットワークを調べるときでも、これがまだ当てはまるということである。さらによいことに、大域的なチャネルの活性化をもつSqueeze-and-Excitation(SE)ネットワークの設計(RegNetY)にさえ成り立つ(Hu et al., 2018)。
class RegNetX32(AnyNet):
def __init__(self, lr=0.1, num_classes=10):
stem_channels, groups, bot_mul = 32, 16, 1
depths, channels = (4, 6), (32, 80)
super().__init__(
((depths[0], channels[0], groups, bot_mul),
(depths[1], channels[1], groups, bot_mul)),
stem_channels, lr, num_classes)We can see that each RegNetX stage progressively reduces resolution and increases output channels.
英語のヒント
各RegNetXの段が、解像度を少しずつ下げ、出力チャネルを増やしていくことがわかる。
RegNetX32().layer_summary((1, 1, 96, 96))Sequential output shape: torch.Size([1, 32, 48, 48])
Sequential output shape: torch.Size([1, 32, 24, 24])
Sequential output shape: torch.Size([1, 80, 12, 12])
Sequential output shape: torch.Size([1, 10])