harveyslash/Facial-Similarity-with-Siamese-Networks-in-Pytorch

A question about the implementation in pytorch

Closed this issue · 1 comments

Hi, the way you implement siamese network is like that:

output1,output2 = model(x0, x1)
loss = criterion (output1,output2)

And here is the another way:

output1 = model.forward_once(x0)
output2 = model.forward_once(x1)
loss = criterion (output1,output2)

Are they different?

They are the same