部分编码:
if __name__ == '__main__':
cnn = EyeNet()
cnn.split_data(y_file_path="../labels/trainLabels_master_256_v2.csv", X="../data/X_train_256_v2.npy")
cnn.reshape_data(img_rows=256, img_cols=256, channels=3, nb_classes=5)
model = cnn.cnn_model(nb_filters=32, kernel_size=(4, 4), batch_size=512, nb_epoch=50)
precision, recall, f1, cohen_kappa, quad_kappa = cnn.predict()
print("Precision: ", precision)
print("Recall: ", recall)
print("F1: ", f1)
print("Cohen Kappa Score", cohen_kappa)
print("Quadratic Kappa: ", quad_kappa)
cnn.save_model(score=recall, model_name="DR_Class")
编码来自以下网站: https://github.com/gregwchase/dsi-capstone#neural-network-architecture