Eric-mingjie / network-slimming

Network Slimming (Pytorch) (ICCV 2017)
MIT License
909 stars 214 forks source link

Question about the weight in nn.Linear #12

Closed Lam1360 closed 5 years ago

Lam1360 commented 5 years ago

https://github.com/Eric-mingjie/network-slimming/blob/98e6b4d28e9909eff22ce4c45cba1b605cac9d65/vggprune.py#L161-L166

I think these is something wrong with the weights in the nn.Linear. nn.Linear is applied after flattening the output of the last conv2d, therefore i think the index shouldn't be idx0, the shape of m0.weight is to do with the output shape of the last conv2d.