VainF / Torch-Pruning

[CVPR 2023] Towards Any Structural Pruning; LLMs / SAM / Diffusion / Transformers / YOLOv8 / CNNs
https://arxiv.org/abs/2301.12900
MIT License
2.63k stars 329 forks source link

Prune Swin Transfomer:Could not find image processor class in the image processor config or the model config. #362

Open IASAnthony opened 6 months ago

IASAnthony commented 6 months ago

@JonnyKong Hello!When I run prune_hf_swin.py, I met a problem:"Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration. Please open a PR/issue to update preprocessor_config.json to use image_processor_type instead of feature_extractor_type. This warning will be removed in v4.40. " And in the next prune stage I met:"UserWarning: Unwrapped parameters detected: ['swin.encoder.layers.0.blocks.1.atten tion.self.relative_position_bias_table', 'swin.encoder.layers.2.blocks.0.attention.self.relative_position_bias_table', 'swin.encoder.layers.2.blocks.2.attention.self.rel........" please help me,thx a lot