he-y / soft-filter-pruning

Soft Filter Pruning for Accelerating Deep Convolutional Neural Networks
https://arxiv.org/abs/1808.06866
376 stars 74 forks source link

How to know the index of the first and last conv layer #10

Closed raninbowlalala closed 5 years ago

raninbowlalala commented 5 years ago

Hello, I want to use your method in InceptionV3, which I download from https://download.pytorch.org/models/inception_v3_google-1a9a5a14.pth, but I don't know how to get the index of the first and last conv layer, could you help me? Thank you very much!

he-y commented 5 years ago

Please refer the code. model.parameters() could get the index and parameters of the network. The conv layers have four dimensions, so you could find them with this condition.

raninbowlalala commented 5 years ago

Thank you! I have already found the index with your help.