TylerYep / torchinfo

View model summaries in PyTorch!
MIT License
2.39k stars 111 forks source link

Summary doesn't give the number of parameters for a GCN #150

Open imaspol opened 2 years ago

imaspol commented 2 years ago

Describe the bug When the summary on the Graph Convolutional Networks model is called and the model input is provided, the output summary doesn't contain any numbers in the column "Param #". To Reproduce Steps to reproduce the behavior: torch-summary 1.4.5

  1. The model in use: https://github.com/usydnlp/TextGCN_analysis
  2. Inputs for the model are features: tensor([0.0000e+00, 1.0000e+00, 2.0000e+00, ..., 2.2587e+04, 2.2588e+04, 2.2589e+04]) and an adjacent matrix (adj): tensor(indices=tensor([[ 0, 1, 13, ..., 22273, 22498, 22589], [ 0, 0, 0, ..., 22589, 22589, 22589]]), values=tensor([0.0010, 0.0002, 0.0002, ..., 0.0011, 0.0014, 0.0052]), size=(22590, 22590), nnz=9027380, layout=torch.sparse_coo)
  3. summary(model, features, adj)

Expected behavior Summary "Param #" column filled with number of parameters

Screenshots

print-screen_GCN_summary_no_params

Desktop (please complete the following information):

TylerYep commented 1 year ago

Please try using the latest version of torchinfo, thanks!