Last active
June 2, 2022 07:49
-
-
Save kusal1990/f4c9ca9b0cc502b8a3b6e910d367c5cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preds_test = [] | |
for i in range(N_SPLITS): | |
model.load_weights('weights_{}.h5'.format(i)) | |
pred = model.predict(X_test_input, batch_size=300, verbose=1) | |
pred_3 = [] | |
for pred_scalar in pred: | |
for i in range(3): | |
pred_3.append(pred_scalar) | |
preds_test.append(pred_3) | |
preds_test = (np.squeeze(np.mean(preds_test, axis=0)) > best_threshold).astype(np.int) | |
preds_test.shape | |
submission['target'] = preds_test | |
submission.to_csv('submission.csv', index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK