arXiv reaDer
ネットワークスパース性の1xNブロックパターン
1xN Block Pattern for Network Sparsity
ネットワークのスパース性は、ニューラルネットワークのサイズの大幅な増加を克服するための有望な方向性として浮上していますが、モデルの精度を維持し、一般的なCPUで大幅な高速化を実現することは未解決の問題です。この論文では、この制限を打破するために、1×Nブロックスパースパターン(ブロック剪定)の1つの新しい概念を提案します。特に、同じ入力チャネルインデックスを持つ連続するN個の出力カーネルは、1つのブロックにグループ化されます。これは、プルーニングパターンの基本的なプルーニング粒度として機能します。 1×Nのスパースパターンは、重要でないと見なされたこれらのブロックを削除します。また、最初に出力チャネル次元の重み行列を再配置して精度を向上させるためにより影響力のあるブロックを導出し、次に入力チャネル次元の次の層の重みに同様の再配置を適用して正しい畳み込み演算を保証するフィルター再配置のワークフローも提供します。さらに、1×Nブロックのスパース性の後の出力計算は、並列化されたブロック単位のベクトル化された操作によって実現できるため、一般的なCPUベースのプラットフォームで大幅な高速化が実現します。剪定パターンの有効性は、ILSVRC-2012での実験で証明されています。たとえば、スパース性が50%でN = 4の場合、このパターンでは、MobileNet-V2のトップ1の精度でフィルタープルーニングよりも約3.0%向上しています。一方、Cortex-A7 CPUでは、ウェイトプルーニングよりも56.04msの推論の節約が得られます。コードはhttps://github.com/lmbxmu/1xNで入手できます。
Though network sparsity emerges as a promising direction to overcome the drastically increasing size of neural networks, it remains an open problem to concurrently maintain model accuracy as well as achieve significant speedups on general CPUs. In this paper, we propose one novel concept of 1×N block sparsity pattern (block pruning) to break this limitation. In particular, consecutive N output kernels with the same input channel index are grouped into one block, which serves as a basic pruning granularity of our pruning pattern. Our 1 ×N sparsity pattern prunes these blocks considered unimportant. We also provide a workflow of filter rearrangement that first rearranges the weight matrix in the output channel dimension to derive more influential blocks for accuracy improvements, and then applies similar rearrangement to the next-layer weights in the input channel dimension to ensure correct convolutional operations. Moreover, the output computation after our 1 ×N block sparsity can be realized via a parallelized block-wise vectorized operation, leading to significant speedups on general CPUs-based platforms. The efficacy of our pruning pattern is proved with experiments on ILSVRC-2012. For example, in the case of 50% sparsity and N=4, our pattern obtains about 3.0% improvements over filter pruning in the top-1 accuracy of MobileNet-V2. Meanwhile, it obtains 56.04ms inference savings on Cortex-A7 CPU over weight pruning. Code is available at https://github.com/lmbxmu/1xN.
updated: Mon Nov 08 2021 03:45:26 GMT+0000 (UTC)
published: Mon May 31 2021 05:50:33 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト