Commit 3925a8a4 authored by Mira Arabi Haddad's avatar Mira Arabi Haddad
Browse files

GROUPWORK_Plot Function

parent 0fe15956
import matplotlib.pyplot as plt
# Plot function for plotting train accuracies,
# and train losses for the NN and CNN of each architecture
## plotting functions
\ No newline at end of file
def plot_figures(d, title, acc=False):
for value in d.values():
plt.plot(value)
plt.xlabel("Epochs")
if acc == False:
plt.ylabel("Accuracy")
else:
plt.ylabel("Loss")
plt.legend([k for k in d.keys()])
plt.title(title)
plt.savefig(f'{title}.png')
plt.show()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment