Closed alimoezzi closed 2 years ago
Hi, can you post your full code so I can reproduce this error?
@TylerYep I tried to get a summary for this vgg implementation
@MajorCarrot Seems like there is an issue with your implementation of the pruned models
Okay, so what I see is that the implementation of spectral normalization in this reference repo uses the weight_orig
parameter similar to what PyTorch does for masked models. The bits I had added was using the _orig
as a reference that the model is masked. One way to overcome this could be to remove this hardcoded dependency and allow the user to specify layers that are pruned (or that the model is pruned). This would be slightly janky but should work nonetheless.
Added a temporary fix in https://github.com/TylerYep/torchinfo/commit/564aeca9ce8ca3d59e71970a9f80d296797457fe but we should consider more robust ways of detecting pruned models. Will get a bug fix release out soon
Released a fix in v1.6.3. Can you try upgrading and seeing if this fixes your issue @realsarm ?
@TylerYep Yes, as far as I tested, it is solved
Thanks for the bug report!
Hi I'm getting an error for a simple vgg16 implementation