Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

pytorch model summary - forward func has more than one argument

$
0
0

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?


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>