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

Hi I would like to prune the AttentionPool2D Layers in the ModifiedResnet of CLIP. For some reason I am running into this error: ``` ace_computational_graph(self, module2node, grad_fn_root, gradfn2module, reused, visited)...

Hello, Thank you for your contribution! I am trying to prune a YOLOv5 Nano model by modifying the script of YOLOv7 pruning on this repository. The code is executed without...

你好,感谢你的工作,我使用yolov4在一个数据集上进行训练,map为64%,使用该权重进行剪枝后,模型大小由256MB减小到了147MB,速度也有很大提升,但是剪枝得到的模型几乎不能检测出任何东西,后续进行微调之后,准确率只有43%,这是不太正常的,剪枝之前是要对模型稀疏化训练吗,我看example中yolov5的代码好像没有稀疏训练的过程。

Hi, as far as i know, geometric median filter importance is better than L1-norm and L2-norm importance. Could you add the geometric median filter importance in this framework?

Thanks for your excellent work. I want to prune a [fasternet](https://github.com/JierunChen/FasterNet/blob/master/models/fasternet.py). But I encounter a weird issue when calculating the importance of groups. ```shell Traceback (most recent call last): File...

I am attempting to perform pruning for ppipnet (https://github.com/jhb86253817/PIPNet). I used version 1.1.19 of torch pruning, but I encountered an error. How can I correct it? Here is my code:...

'''python def load_state_dict(model: torch.nn.Module, state_dict: dict): full_state_dict = state_dict['full_state_dict'] attributions = state_dict['attributions'] for name, module in model.named_modules(): # load state dicts if name in full_state_dict: module.__dict__.update(full_state_dict[name]) # load attributes if...

``` group = DG.get_pruning_group(model_.layer4[0].conv2, tp.prune_conv_out_channels, idxs=idxs_ ) ``` ``` -------------------------------- Pruning Group -------------------------------- [0] prune_out_channels on layer4.0.conv2 (Conv2d(512, 1, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)) => prune_out_channels on layer4.0.conv2...