MCPcopy Create free account
hub / github.com/pytorch/examples / forward

Method forward

siamese_network/main.py:64–78  ·  view source on GitHub ↗
(self, input1, input2)

Source from the content-addressed store, hash-verified

62 return output
63
64 def forward(self, input1, input2):
65 # get two images' features
66 output1 = self.forward_once(input1)
67 output2 = self.forward_once(input2)
68
69 # concatenate both images' features
70 output = torch.cat((output1, output2), 1)
71
72 # pass the concatenation to the linear layers
73 output = self.fc(output)
74
75 # pass the out of the linear layers to sigmoid layer
76 output = self.sigmoid(output)
77
78 return output
79
80class APP_MATCHER(Dataset):
81 def __init__(self, root, train, download=False):

Callers

nothing calls this directly

Calls 1

forward_onceMethod · 0.95

Tested by

no test coverage detected