Torch-Pruning icon indicating copy to clipboard operation
Torch-Pruning copied to clipboard

[CVPR 2023] Towards Any Structural Pruning; LLMs / SAM / Diffusion / Transformers / YOLOv8 / CNNs

Results 196 Torch-Pruning issues
Sort by recently updated
recently updated
newest added

when I pruner https://github.com/chenjun2hao/DDRNet.pytorch I meet the error ` def prune_model(model): model.cpu() DG = tp.DependencyGraph().build_dependency(model, torch.randn((1,3,1024,2048))) def prune_conv(conv, amount=0.2): strategy = tp.strategy.L1Strategy() pruning_index = strategy(conv.weight, amount=amount) print(pruning_index) # weight =...

Hi @VainF, Thank you for the nice work. It is a clean and very helpful pruning framework, especially for unstructured pruning. However, I have trouble pruning the ResNet20 model with...

Hi! My company may want to use your library! Do you plan on releasing some notes explaining how the dependency graphs are built ? And the exact way you decide...

when I use 'Torch-Pruning/examples/coco_yolo/train_with_pruning.py' to pure yolov5s , will have error'RuntimeError: Given groups=1, weight of size [255, 128, 1, 1], expected input[8, 77, 80, 80] to have 128 channels, but...

Got ``` RuntimeError: Given groups=1, weight of size [255, 128, 1, 1], expected input[22, 77, 80, 80] to have 128 channels, but got 77 channels instead ``` when running ```...

Could you please check `dependency.py` lines 549-550: ``` for o in flatten_as_list(out): module2node = self._build_graph(o.grad_fn, gradfn2module, reused) ``` looks like for multiple outputs the only last module2node is saved. At...

DG.build_dependency(model, example_inputs=th.randn(1,1,28,28)) File "/usr/local/lib/python3.6/dist-packages/torch_pruning/dependency.py", line 309, in build_dependency self.update_index() File "/usr/local/lib/python3.6/dist-packages/torch_pruning/dependency.py", line 315, in update_index self._set_fc_index_transform( node ) File "/usr/local/lib/python3.6/dist-packages/torch_pruning/dependency.py", line 437, in _set_fc_index_transform feature_channels = _get_in_node_out_channels(fc_node.inputs[0]) **IndexError: list index...

Hi - thanks for a wonderful tool. I am trying to test it out with a pretrained model from [here](https://github.com/Deep-MI/FastSurfer/tree/master/checkpoints/Axial_Weights_FastSurferCNN/ckpts). However I am encountering the following error: ``` module name:...

bug

我跑了下示例代码,发现模型大小没有变化,看了下代码,发现那个比例针对的是某一个模块,那如果要对整个网络进行剪枝是需要,每一个模块单独进行剪枝吗?不能整体进行剪枝吗?

I have a ViT model that takes an hour to build depency graph for. I'd like to store the `DependencyGraph` instance to a file and load it later. My code...