mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 01:12:59 +00:00
encoderonly: add graph plotting
This commit is contained in:
parent
82e01da70b
commit
1a4ac3ed66
1 changed files with 32 additions and 2 deletions
|
@ -101,7 +101,7 @@ summarywriter(model, os.path.join(DIRPATH_OUTPUT, "summary.txt"))
|
||||||
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
# ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████
|
# ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████
|
||||||
|
|
||||||
model.fit(dataset_train,
|
history = model.fit(dataset_train,
|
||||||
validation_data=dataset_validate,
|
validation_data=dataset_validate,
|
||||||
epochs=25,
|
epochs=25,
|
||||||
|
|
||||||
|
@ -124,6 +124,36 @@ model.fit(dataset_train,
|
||||||
)
|
)
|
||||||
logger.info(">>> Training complete")
|
logger.info(">>> Training complete")
|
||||||
|
|
||||||
|
logger.info(">>> Plotting graphs")
|
||||||
|
|
||||||
|
plt.plot(history.history["loss"])
|
||||||
|
plt.title("Training Loss")
|
||||||
|
plt.ylabel("loss")
|
||||||
|
plt.xlabel("epoch")
|
||||||
|
plt.savefig(os.path.join(DIRPATH_OUTPUT, "loss.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
plt.plot(history.history["accuracy"])
|
||||||
|
plt.title("Training Accuracy")
|
||||||
|
plt.ylabel("accuracy")
|
||||||
|
plt.xlabel("epoch")
|
||||||
|
plt.savefig(os.path.join(DIRPATH_OUTPUT, "acc.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
plt.plot(history.history["val_loss"])
|
||||||
|
plt.title("Validation Loss")
|
||||||
|
plt.ylabel("val_loss")
|
||||||
|
plt.xlabel("epoch")
|
||||||
|
plt.savefig(os.path.join(DIRPATH_OUTPUT, "val_loss.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
plt.plot(history.history["val_accuracy"])
|
||||||
|
plt.title("Validation Accuracy")
|
||||||
|
plt.ylabel("val_accuracy")
|
||||||
|
plt.xlabel("epoch")
|
||||||
|
plt.savefig(os.path.join(DIRPATH_OUTPUT, "val_acc.png"))
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
|
||||||
# ██████ ██████ ███████ ██████ ██ ██████ ████████ ██ ██████ ███ ██
|
# ██████ ██████ ███████ ██████ ██ ██████ ████████ ██ ██████ ███ ██
|
||||||
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██
|
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██
|
||||||
|
@ -132,8 +162,8 @@ logger.info(">>> Training complete")
|
||||||
# ██ ██ ██ ███████ ██████ ██ ██████ ██ ██ ██████ ██ ████
|
# ██ ██ ██ ███████ ██████ ██ ██████ ██ ██ ██████ ██ ████
|
||||||
|
|
||||||
|
|
||||||
|
logger.info("Predictions coming soon.")
|
||||||
# TODO FILL THIS IN
|
# TODO FILL THIS IN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# █████ █████ █████ █████ █████ █████ █████ █████ █████
|
# █████ █████ █████ █████ █████ █████ █████ █████ █████
|
||||||
|
|
Loading…
Reference in a new issue