0bf81caddbc64e81b8b2989e8dbb5a0ec49e489a,Security_and_MachineLearning/src/defensive_chap7/face_auth.py,,,#,11
Before Change
model = load_model(trained_model_weights)
// Use Loss=categorical_crossentropy.
print("Compile model.")
model.compile(loss="categorical_crossentropy",
optimizer="adam",
metrics=["accuracy"])
After Change
// Prediction.
preds = model.predict(x)[0]
predict_idx = np.argmax(preds)
// Final judgement.
judge = "Reject"
prob = preds[predict_idx] * 100
if prob > THRESHOLD:
judge = "Unlock"
msg = "{} ({:.1f}%). res="{}"".format(classes[predict_idx], prob, judge)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: 13o-bbr-bbq/machine_learning_security
Commit Name: 0bf81caddbc64e81b8b2989e8dbb5a0ec49e489a
Time: 2020-01-08
Author: takaesu235@gmail.com
File Name: Security_and_MachineLearning/src/defensive_chap7/face_auth.py
Class Name:
Method Name:
Project Name: nipy/dipy
Commit Name: bd300edf778f2a5687e41416f2798ebb519f496c
Time: 2020-11-11
Author: shreyasfadnavis@gmail.com
File Name: dipy/denoise/patch2self.py
Class Name:
Method Name: patch2self
Project Name: openeventdata/mordecai
Commit Name: 834340875d6baae452eaf527443025c356a621d2
Time: 2017-11-19
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparse
Method Name: geoparse