メインコンテンツ

枝刈り

R2026b
畳み込み層の中で最も重要度の低いフィルターを枝刈りして、ニューラル ネットワークにおける学習可能なパラメーターの数を削減する

枝刈りは、畳み込み層の中で最も重要度の低いフィルターを削除することで、ニューラル ネットワークにおける学習可能なパラメーターの数を削減します。

trainnet 関数を使用してネットワークに学習させることができる場合は、compressNetworkUsingTaylorPruning 関数を使用してネットワークを枝刈りします。trainnet 関数を使用してネットワークに学習させることができない場合は、代わりに taylorPrunableNetwork オブジェクトを使用してカスタム枝刈りループを作成します。

Deep Learning Toolbox™ Model Compression Library で利用可能な圧縮手法の詳細な概要については、Reduce Memory Footprint of Deep Neural Networksを参照してください。

Simplified illustration of pruning. On the left is a sketch of a neural network with three layers that consist of four, three, and four neurons, respectively. All neurons are connected to all other neurons. An arrow points to a second sketch on the right that shows the same network, but one neuron has been cut out from the middle layer, and two neurons have been cut out from the final layer.

関数

すべて展開する

compressNetworkUsingTaylorPruningCompress neural network using Taylor pruning (R2026a 以降)
taylorPrunableNetworkNeural network suitable for compression using Taylor pruning (R2022a 以降)
forward学習用の深層学習ネットワーク出力の計算
predict推論用の深層学習ネットワーク出力の計算
updatePrunablesRemove filters from prunable layers based on importance scores (R2022a 以降)
updateScoreCompute and accumulate Taylor-based importance scores for pruning (R2022a 以降)

トピック

注目の例