Spaces:
Runtime error
Runtime error
Commit
•
fa8f835
1
Parent(s):
e92d38f
fix cpu stuff
Browse files- metrics/metrics.py +1 -1
metrics/metrics.py
CHANGED
@@ -35,7 +35,7 @@ class IdScore(nn.Module):
|
|
35 |
super(IdScore, self).__init__()
|
36 |
# print('Loading ResNet ArcFace')
|
37 |
self.facenet = Backbone(input_size=112, num_layers=50, drop_ratio=0.6).to(device)
|
38 |
-
self.facenet.load_state_dict(torch.load('./pretrained_models/model_ir_se50.pth', map_location=torch.device(
|
39 |
self.face_pool = torch.nn.AdaptiveAvgPool2d((112, 112))
|
40 |
self.facenet.eval()
|
41 |
self.cosine_sim = nn.CosineSimilarity(dim=1)
|
|
|
35 |
super(IdScore, self).__init__()
|
36 |
# print('Loading ResNet ArcFace')
|
37 |
self.facenet = Backbone(input_size=112, num_layers=50, drop_ratio=0.6).to(device)
|
38 |
+
self.facenet.load_state_dict(torch.load('./pretrained_models/model_ir_se50.pth', map_location=torch.device(device)))
|
39 |
self.face_pool = torch.nn.AdaptiveAvgPool2d((112, 112))
|
40 |
self.facenet.eval()
|
41 |
self.cosine_sim = nn.CosineSimilarity(dim=1)
|