10

I am using torch summary

from torchsummary import summary

I want to pass more than one argument when printing the model summary, but the examples mentioned here: Model summary in pytorch taken only one argument. for e.g.:

model = Network().to(device)
summary(model,(1,28,28))

The reason is that the forward function takes two arguments as input, e.g.:

def forward(self, img1, img2):

How do I pass two arguments here?

Abhijay Ghildyal
  • 4,044
  • 6
  • 33
  • 54

1 Answers1

19

You can use the example given here: pytorch summary multiple inputs

summary(model, [(1, 16, 16), (1, 28, 28)])
Abhijay Ghildyal
  • 4,044
  • 6
  • 33
  • 54