mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 17:23:01 +00:00
DeepLabV3+: close each matplotlib figure after writing it
This commit is contained in:
parent
6ce121f861
commit
15a3150127
1 changed files with 4 additions and 0 deletions
|
@ -181,24 +181,28 @@ plt.title("Training Loss")
|
||||||
plt.ylabel("loss")
|
plt.ylabel("loss")
|
||||||
plt.xlabel("epoch")
|
plt.xlabel("epoch")
|
||||||
plt.savefig(os.path.join(DIR_OUTPUT, "loss.png"))
|
plt.savefig(os.path.join(DIR_OUTPUT, "loss.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
plt.plot(history.history["accuracy"])
|
plt.plot(history.history["accuracy"])
|
||||||
plt.title("Training Accuracy")
|
plt.title("Training Accuracy")
|
||||||
plt.ylabel("accuracy")
|
plt.ylabel("accuracy")
|
||||||
plt.xlabel("epoch")
|
plt.xlabel("epoch")
|
||||||
plt.savefig(os.path.join(DIR_OUTPUT, "acc.png"))
|
plt.savefig(os.path.join(DIR_OUTPUT, "acc.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
plt.plot(history.history["val_loss"])
|
plt.plot(history.history["val_loss"])
|
||||||
plt.title("Validation Loss")
|
plt.title("Validation Loss")
|
||||||
plt.ylabel("val_loss")
|
plt.ylabel("val_loss")
|
||||||
plt.xlabel("epoch")
|
plt.xlabel("epoch")
|
||||||
plt.savefig(os.path.join(DIR_OUTPUT, "val_loss.png"))
|
plt.savefig(os.path.join(DIR_OUTPUT, "val_loss.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
plt.plot(history.history["val_accuracy"])
|
plt.plot(history.history["val_accuracy"])
|
||||||
plt.title("Validation Accuracy")
|
plt.title("Validation Accuracy")
|
||||||
plt.ylabel("val_accuracy")
|
plt.ylabel("val_accuracy")
|
||||||
plt.xlabel("epoch")
|
plt.xlabel("epoch")
|
||||||
plt.savefig(os.path.join(DIR_OUTPUT, "val_acc.png"))
|
plt.savefig(os.path.join(DIR_OUTPUT, "val_acc.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue