Created
June 11, 2021 18:25
-
-
Save overtunned/6980b2acdfe78b07c7ad6a5ca0ca638f to your computer and use it in GitHub Desktop.
plot keras
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
| def plot_learning_curve(history): | |
| plt.figure(figsize=(16,8)) | |
| plt.subplot(1,2,1) | |
| plt.plot(history.history['accuracy']) | |
| plt.plot(history.history['val_accuracy']) | |
| plt.title('model accuracy') | |
| plt.ylabel('accuracy') | |
| plt.xlabel('epoch') | |
| plt.legend(['train', 'Val'], loc='upper left') | |
| plt.savefig('./accuracy_curve.png') | |
| plt.subplot(1,2,2) | |
| plt.plot(history.history['loss']) | |
| plt.plot(history.history['val_loss']) | |
| plt.title('model loss') | |
| plt.ylabel('loss') | |
| plt.xlabel('epoch') | |
| plt.legend(['train', 'test'], loc='upper left') | |
| plt.savefig('./loss_curve.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment