sksq96 / pytorch-summary

Model summary in PyTorch similar to `model.summary()` in Keras
MIT License
4.01k stars 412 forks source link

Problem with shared_weights #131

Open luissalgueiro opened 4 years ago

luissalgueiro commented 4 years ago

Hello Guys,

This is a great work, it is a very util package.

I'm working with a CNN that shared weights along some branches and if I applied correctly the package, I believe there is an error when it its calculated the shared weights in a CNN.

For instance : A main model have some branches that shared weights between the branches. image

My branch has only two conv2d and two Leaky-ReLU. It defines well the num of parameters to be learned as expected. image

But, when I defined the whole model (Shared) I believe that there is some error in the number of the parameters to be learned. I believed it is adding the number of parameters as the number of branches defined.

image

Can you please check this or maybe I am missing something.

Thanks

Luis

TylerYep commented 4 years ago

Try #124

wonlp commented 1 year ago

have you worked it out? I seem to have the same problem with you.