vrvundyala commited on
Commit
fedb0a0
·
1 Parent(s): ed6b45c

siamese network first push

Browse files
app/Hackathon_setup/face_recognition.py CHANGED
@@ -79,7 +79,7 @@ def get_similarity(img1, img2):
79
  myModel = Siamese().to(device)
80
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
81
  ckpt_path = os.path.join(BASE_DIR, "siamese_model.t7")
82
- ckpt = torch.load(ckpt_path)
83
  myModel.load_state_dict(ckpt['net_dict'])
84
  myModel.eval()
85
 
 
79
  myModel = Siamese().to(device)
80
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
81
  ckpt_path = os.path.join(BASE_DIR, "siamese_model.t7")
82
+ ckpt = torch.load(ckpt_path, map_location=device)
83
  myModel.load_state_dict(ckpt['net_dict'])
84
  myModel.eval()
85