Spaces:
Sleeping
Sleeping
Pallavi Bhoj
commited on
Commit
·
ab3de06
1
Parent(s):
602f7e3
Update face_recognition_model.py
Browse files
app/Hackathon_setup/face_recognition_model.py
CHANGED
@@ -44,16 +44,16 @@ class Siamese(torch.nn.Module):
|
|
44 |
#YOUR CODE HERE
|
45 |
# forward_once is for one image. This can be used while classifying the face images
|
46 |
# forward_once is for one image. This can be used while classifying the face images
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
# remove 'pass' once you have written your code
|
58 |
#YOUR CODE HERE
|
59 |
|
|
|
44 |
#YOUR CODE HERE
|
45 |
# forward_once is for one image. This can be used while classifying the face images
|
46 |
# forward_once is for one image. This can be used while classifying the face images
|
47 |
+
def forward_once(self, x):
|
48 |
+
output = self.cnn1(x)
|
49 |
+
output = output.view(output.size()[0], -1)
|
50 |
+
output = self.fc1(output)
|
51 |
+
return output
|
52 |
|
53 |
+
def forward(self, x):
|
54 |
+
output1 = self.forward_once(input1)
|
55 |
+
output2 = self.forward_once(input2)
|
56 |
+
return output1, output2
|
57 |
# remove 'pass' once you have written your code
|
58 |
#YOUR CODE HERE
|
59 |
|