Spaces:
Running
Running
Pallavi Bhoj
commited on
Commit
•
8927897
1
Parent(s):
6bdc76e
Update face_recognition.py
Browse files
app/Hackathon_setup/face_recognition.py
CHANGED
@@ -115,7 +115,7 @@ def get_face_class(img1):
|
|
115 |
##Better Hint: Siamese experiment is covered in one of the labs
|
116 |
face1 = trnscm(det_img1).unsqueeze(0)
|
117 |
|
118 |
-
feature_net =
|
119 |
model = torch.load(current_path + '/siamese_model.t7', map_location=device) ##
|
120 |
feature_net.load_state_dict(model['net_dict'])
|
121 |
feature_net.eval()
|
|
|
115 |
##Better Hint: Siamese experiment is covered in one of the labs
|
116 |
face1 = trnscm(det_img1).unsqueeze(0)
|
117 |
|
118 |
+
feature_net = Siamese().to(device)
|
119 |
model = torch.load(current_path + '/siamese_model.t7', map_location=device) ##
|
120 |
feature_net.load_state_dict(model['net_dict'])
|
121 |
feature_net.eval()
|