Issue
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?
Solution
You can use the example given here: pytorch summary multiple inputs
summary(model, [(1, 16, 16), (1, 28, 28)])
Answered By - PixelPioneer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.