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

Multi-parameter input problem #396

Open IAmAlwaysOnline opened 3 months ago

IAmAlwaysOnline commented 3 months ago

So my example_input is two tensors how should I pass in, so I have one input and one auxiliary input dummy_input_x = torch.randn(1, IN_CHANNEL, 224, 224).to(device) dummy_input_x_ex = torch.randn(1, EX_CHANNEL, 224, 224).to(device) Can I spell tuple or list, but the assertion error is triggered when run: RuntimeError: CUDA error: device-side assert triggered

Edgar454 commented 3 months ago

Use a dictionnary to specify the the field and inputs associated for example : example_inputs = {"field1": dummy_input_x , "field2":dummy_input_x_ex }