Skip to content
Snippets Groups Projects
Commit c5682506 authored by Jean-Luc Parouty's avatar Jean-Luc Parouty
Browse files

GTSRB update

parent e41ca86b
No related branches found
No related tags found
No related merge requests found
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -46,10 +46,13 @@ def init(mplstyle='idle/talk.mplstyle'):
print(' Keras version :',tf.keras.__version__)
# -------------------------------------------------------------
# init_folder
# Folder cooking
# -------------------------------------------------------------
#
def init_folder(path):
def tag_now():
return datetime.datetime.now().strftime("%Y-%m-%d_%Hh%Mm%Ss")
def mkdir(path):
os.makedirs(path, mode=0o750, exist_ok=True)
def get_directory_size(path):
......@@ -147,14 +150,12 @@ def plot_history(history, figsize=(8,6)):
"""
# Accuracy
plt.figure(figsize=figsize)
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.plot(history.history['accuracy'])
plt.plot(history.history['val_accuracy'])
plt.title('Model accuracy')
plt.ylabel('Accuracy')
plt.xlabel('Epoch')
plt.legend(['Train', 'Test'], loc='upper left')
if save_as!=None:
save_fig(save_as+'-acc', svg=False)
plt.show()
# Loss values
......@@ -168,6 +169,10 @@ def plot_history(history, figsize=(8,6)):
plt.show()
# -------------------------------------------------------------
# plot_confusion_matrix
# -------------------------------------------------------------
#
def plot_confusion_matrix(cm,
target_names,
title='Confusion matrix',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment