Open TianGao-NJUST opened 4 months ago
Hello @812985728, could you provide the model name in your case?
hello, the model is designed by me, which based on deit , the problem occurs in MLP module。
812985728 @.***
------------------ 原始邮件 ------------------ 发件人: "Rémi @.>; 发送时间: 2024年2月23日(星期五) 下午2:31 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [VainF/Torch-Pruning] IndexError: index 512 is out of bounds for dimension 0 with size 512 (Issue #342)
Hello @812985728, could you provide the model name in your case?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
imp = tp.importance.MagnitudeImportance(p=1) example_inputs = torch.randn(1, 3, 224, 224) ignored_layers = [] for m in model.modules(): if isinstance(m, torch.nn.Linear) and m.out_features == args.nb_classes: ignored_layers.append(m) # DO NOT prune the final classifier!
4. Pruning-Finetuning的循环