-
Notifications
You must be signed in to change notification settings - Fork 415
fix: Fixed hook for DenseNet #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
When the hook encounters an object child that is not a Sequential or a Module but a wrapper of Modules for instance, it fails. Fixed it by checking if the current child has children modules.
👍 |
Hi,I have install your branch using pip install git+https://github.com/frgfm/pytorch-summary.git, but I still meet this issue " |
Hi @kaixinbear, Cheers! |
just now,I rerun
|
Thanks for the code @kaixinbear ! If you wish to check this PR modifications, you need to install from my
Then run your code again, and it should be working If not, please paste your |
Well,I got it.Thanks for your kind reply. |
Hi there, i do the following commands however still end up with the error as discussed above, !pip install git+https://github.com/frgfm/pytorch-summary@densenet-fix Any help would be appreciated |
Hello @GregorKerr1996,
Let me know if the error persists! |
Besides, for personal use, I made a python library of my own adding ops estimations if you are interested. I benchmarked my implementation against Here it is: https://github.com/frgfm/torch-scan |
@sksq96 @Naireen |
@harshraj22 this repo doesn't seem to be maintained anymore but feel free to check out this: https://github.com/frgfm/torch-scan |
Hello there,
I found recently that the main function does not work on the
torchvision
implementation of DenseNet.would yield
The reason behind this is the
_DenseLayer
type in the architecture. Since it does not inherit fromtorch.nn.Sequential
ortorch.nn.ModuleList
, the element is not skipped when hooking all object children.This PR fixes it by checking if the current child has any children modules, before registering ahook.
Hope this helps!
Cheers