Closed JiangStein closed 5 years ago
Hi.
In that case, summary(net, torch.zeros((1, 3, 224, 224)), input2=torch.zeros((1, 3, 224, 224)))
will work. Unlike torchsummary, you should pass the tensor to the summary function not shape of input.
It works! Thanks a lot for your help, it is much more brief than print!
Hi, I build a siamese network, and the forward function is like
def forward(self, input1, input2):
x1 = self.cnn(input1)
x2 = self.cnn(input2)
output = x1-x2
return output
Does torchsummaryX support such situation? If so, how should I write summary? I triedsummary(net,(3,224,224),(3,224,224))
, but it didn't work. Thank you!