Browse Source

Fix of save size of model accuracy

Jerome Buisine 3 years ago
parent
commit
6086e4316f
2 changed files with 8 additions and 1 deletions
  1. 7 0
      classification_cnn_keras_svd_img.py
  2. 1 1
      run.sh

+ 7 - 0
classification_cnn_keras_svd_img.py

@@ -41,6 +41,8 @@ import numpy as np
 from modules.model_helper import plot_info
 from modules.image_metrics import svd_metric
 
+import matplotlib.pyplot as plt
+
 # preprocessing of images
 from path import Path
 from PIL import Image
@@ -283,6 +285,11 @@ def main():
                 os.makedirs(directory)
             filename = directory + "/" + filename
 
+        fig_size = plt.rcParams["figure.figsize"]
+        fig_size[0] = 9
+        fig_size[1] = 9
+        plt.rcParams["figure.figsize"] = fig_size
+
         # save plot file history
         plot_info.save(history, filename)
 

+ 1 - 1
run.sh

@@ -12,4 +12,4 @@ fi
 # python classification_cnn_keras_cross_validation.py --directory ../models/$size/ --output cnn_cross_validation_model --batch_size 32 --epochs 150 --img $size
 # python classification_cnn_keras_svd.py --directory ../models/$size/ --output svd_model --batch_size 32 --epochs 150 --img $size
 
-python classification_cnn_keras_svd_img.py --directory ../models/$size/ --output svd_img_model --batch_size 32 --epochs 150 --img $size --generate y
+python classification_cnn_keras_svd_img.py --directory ../models/$size/ --output svd_img_model --batch_size 32 --epochs 150 --img $size --generate n