Woodman718 / CapsNets

A Stable and Reliable Capsules Network for Image classification
13 stars 2 forks source link

Inaccurate number of parameters from torchsummary #3

Open Thity opened 1 year ago

Thity commented 1 year ago

The number of parameters reported for CapsNet seems to be coming from torchsummary.

However, torchsummary parameter count is inaccurate for custom modules, in particular when parameters name is not "weight" or "bias" (see https://github.com/sksq96/pytorch-summary/issues/65). The count does not consider network.digits.W parameters that represent ~25% of CapsNet parameters.

Woodman718 commented 1 year ago

The reported parameter count for CapsNet is obtained from torchsummary. However, it's worth noting that torchsummary's parameter count can be inaccurate when dealing with custom modules. In this case, it doesn't account for parameters in 'network.digits.W,' which amount to approximately 0.51 million, representing roughly 26% of CapsNet's total parameters. Thank you for your attention.