Load the sparse checkpoint and increase pruning ratio. Here, the pruning ratio is increased from 0.1 to 0.2.
model = resnet18()
model.load_state_dict(torch.load('resnet18_sparse.pth.tar'))
inputs = torch.randn([1, 3, 224, 224], dtype=torch.float32)
pruner = Pruner(model, inputs)
model = pruner.prune(ratio=0.2, output_script='pruned_resnet18.py')
Once the new pruned model is generated, you can start fine-tuning again.