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 using the code with DETR models I find it incompatible. I think the tracing doesn't work well with DETR. Has anyone used it with any implementation of DETR ?...

hi, i came up with this error when finetuning the yolov6 model: ... in _trace_computational_graph module2node[param].pruning_dim = dim KeyError: Parameter containing: tensor([0., 1., 2., 3., 4., 5., 6., 7., 8.,...

When I prune other models, an error occurs ![pruning](https://github.com/VainF/Torch-Pruning/assets/65944463/5f9f645a-8ed8-4f13-923b-cffccc06ba2c) May I ask what's going on

您好, VainF: 对于您的作品感觉很赞赏! 终于有个可以将大多数模型剪枝简化的框架了! 真的非常感谢! 我使用了您的框架与我自己实现的对于YOLOv5n的剪枝, 但是发现结果差距很大。 试验了对YOLOv5n使用基于BN层梯度加L1正则的全局剪枝方法, 一种是手动实现版本(非torch_pruning版本), 一种是基于torch_pruning实现版本。 对比发现, 手动实现版本剪枝60%后在验证集上仍然可以达到PR值均在0.9以上, 但是基于torch_pruning实现的版本, 在剪枝60%后并finetune恢复训练后, 精度几乎为0。通过观察, 在剪枝30%以上后, 精度就会大幅下降且恢复不出来。 疑问: 该框架是不是没有将裁剪前对应通道的权重重新赋值给裁剪后的网络? 通过使用netron观察裁剪后的两个onnx网络, 发现对于两个网络的同一层, 裁剪后的通道数不同。 为什么会出现这样的情况? 使用的标准是相同的, 裁剪出来的结果是不同的。 另外, 在剪枝之前, 我已进行稀疏训练 关键部分代码如下: **pruner的构建过程:**...

论文中图3(b)的剪纸方案中,每一行是代表一个channel吗,白色表示剪掉?如果是的话,为什么根据f4+推出的f4-是剪掉竖着的一列。还有f2-和f2+为什么不相等呢

您好,非常感谢您在万般忙碌抽空看这封信, 我在剪枝的时候遇到一个问题,有一个参数它不能构建依赖图,报错信息如下: unwrapped_paramters [UnwrappedParameters(parameters=Parameter containing: tensor([0.5190, 0.0565, 0.3977, ..., 0.2764, 0.2888, 0.1559], requires_grad=True), pruning_dim=0)] Traceback (most recent call last): File "prune_hf_wav2vec.py", line 49, in pruner = tp.pruner.MetaPruner( File "/root/anaconda3/envs/hugface2/lib/python3.8/site-packages/torch_pruning/pruner/algorithms/metapruner.py", line...

When I tried to prune yolov8m-pose.pt by using yolov8_pruning.py, I encountered a bug: Traceback (most recent call last): File "/home/huangjun/ultralytics/yolov8_pruning.py", line 390, in prune(args) File "/home/huangjun/ultralytics/yolov8_pruning.py", line 334, in prune...

bug

I want to use interactive pruning, but the `step` method of `GroupNormRruner` returns nothing when interactive = True. ```python def step(self, interactive=False): super(GroupNormPruner, self).step(interactive=interactive) # update the group list after...

bug

When I use pruner to build the dependency graph, an warning is generated: _**Maximum recursive depth reached!**_ My network structure is [PENET ](https://github.com/JUGGHM/PENet_ICRA2021/tree/main)similar to UNET, what causes this and how...