The pruner requires two arguments:
- The model to be pruned
- The inputs needed by the model for inference
import torch
from pytorch_nndct import SparsePruner
inputs = torch.randn([1, 3, 224, 224], dtype=torch.float32)
pruner = SparsePruner(model, inputs)