frgfm / torch-scan

Seamless analysis of your PyTorch models (RAM usage, FLOPs, MACs, receptive field, etc.)
https://frgfm.github.io/torch-scan/latest
Apache License 2.0
208 stars 22 forks source link

Feature request: Add support for receptive field #12

Closed kHarshit closed 4 years ago

kHarshit commented 4 years ago

Hi,

Thanks for your library. It works great with torchvision models.

Is it possible to add support for the receptive field e.g. in https://github.com/sksq96/pytorch-summary/pull/47.

frgfm commented 4 years ago

Hi @kHarshit,

Very sorry for the late reply, for unknown reasons I did not get a notification about your issue! Glad it's helping, and thanks for the reference. I already intended to work on this, I'll look into this shortly!

frgfm commented 4 years ago

Hello there @kHarshit,

Finally made a proper PR to address your request in #21 ! Let me know what you think, I will probably merge it even though it only supports highway nets. For models with multiple branches or residual connections, I'll have to find another way later. I took a different approach than the one you referred to, but it looks like it's working well!

frgfm commented 4 years ago

Closing this as it's addressed by #21. For support of all type of architecture, I'll have to change the crawling method and probably use onnx conversion. I'll look into this later!

@kHarshit feel free to reopen if you encounter any issue or think this was not tackled!