siamese_nn.py line 28 gave an error of mismatched types, I changed the line to this to fix it:
model.fit([np.float32(training_pairs[:, 0]), np.float32(training_pairs[:, 1])], np.float32(training_labels), batch_size=128, epochs=10)
Now, when I try to run face_recognition_system.py, I get a "SystemError: unknown opcode" message on line 25.
The Keras documentation says we need to supply a custom_objects paramter, and it is supplied, but obviously not correctly.
model = load_model('siamese_nn.h5', custom_objects={'contrastive_loss': utils.contrastive_loss, 'euclidean_distance': utils.euclidean_distance})
siamese_nn.py line 28 gave an error of mismatched types, I changed the line to this to fix it: model.fit([np.float32(training_pairs[:, 0]), np.float32(training_pairs[:, 1])], np.float32(training_labels), batch_size=128, epochs=10)
Now, when I try to run face_recognition_system.py, I get a "SystemError: unknown opcode" message on line 25.
The Keras documentation says we need to supply a custom_objects paramter, and it is supplied, but obviously not correctly. model = load_model('siamese_nn.h5', custom_objects={'contrastive_loss': utils.contrastive_loss, 'euclidean_distance': utils.euclidean_distance})
Please help.