プルーニング ランナーを作成する - 2.5 日本語

Vitis AI オプティマイザー ユーザー ガイド (UG1333)

Document ID
UG1333
Release Date
2022-06-15
Version
2.5 日本語

モジュールをインポートし、入力シグネチャを準備します。

from pytorch_nndct import get_pruning_runner

# The input signature should have the same shape and dtype as the model input.
input_signature = torch.randn([1, 3, 224, 224], dtype=torch.float32) 

反復プルーニング ランナーを作成します。

runner = get_pruning_runner(model, input_signature, 'iterative')

または、ワンステップ プルーニング ランナーを作成します。

runner = get_pruning_runner(model, input_signature, 'one_step')