Unverified Commit 42337dc0 authored by J-shang's avatar J-shang Committed by GitHub
Browse files

Speed up model compression pipeline (#3695)

parent f579f176
......@@ -234,11 +234,11 @@ def main(args):
kw_args['sparsifying_training_batches'] = 1
if args.pruner == 'slim':
kw_args['sparsifying_training_epochs'] = 5
kw_args['sparsifying_training_epochs'] = 1
if args.pruner == 'agp':
kw_args['pruning_algorithm'] = 'l1'
kw_args['num_iterations'] = 5
kw_args['num_iterations'] = 2
kw_args['epochs_per_iteration'] = 1
# Reproduced result in paper 'PRUNING FILTERS FOR EFFICIENT CONVNETS',
......
......@@ -15,21 +15,21 @@ python3 basic_pruners_torch.py --pruner slim --pretrain-epochs 1 --fine-tune-epo
python3 model_speedup.py --example_name slim
echo "testing l1filter pruning and speedup..."
python3 basic_pruners_torch.py --pruner l1filter --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10
python3 basic_pruners_torch.py --pruner l1filter --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10 --pretrained-model-dir experiment_data/pretrain_cifar10_vgg16.pth
python3 model_speedup.py --example_name l1filter
echo "testing apoz pruning and speedup..."
python3 basic_pruners_torch.py --pruner apoz --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10
python3 basic_pruners_torch.py --pruner apoz --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10 --pretrained-model-dir experiment_data/pretrain_cifar10_vgg16.pth
python3 model_speedup.py --example_name apoz
echo 'testing level pruner pruning'
python3 basic_pruners_torch.py --pruner level --pretrain-epochs 1 --fine-tune-epochs 1 --model lenet --dataset mnist
echo 'testing agp pruning'
python3 basic_pruners_torch.py --pruner agp --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10
python3 basic_pruners_torch.py --pruner agp --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10 --pretrained-model-dir experiment_data/pretrain_cifar10_vgg16.pth
echo 'testing mean_activation pruning'
python3 basic_pruners_torch.py --pruner mean_activation --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10
python3 basic_pruners_torch.py --pruner mean_activation --pretrain-epochs 1 --fine-tune-epochs 1 --model vgg16 --dataset cifar10 --pretrained-model-dir experiment_data/pretrain_cifar10_vgg16.pth
echo "testing lottery ticket pruning..."
python3 lottery_torch_mnist_fc.py --train_epochs 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment