Skip to content
Snippets Groups Projects
Commit c9db4283 authored by umlauf's avatar umlauf
Browse files

loss

parent d30ccb5b
No related branches found
No related tags found
No related merge requests found
......@@ -2,16 +2,29 @@
import matplotlib.pyplot as plt
import re
import numpy as np
with open("output_loss_epoch_data.txt", "r") as f:
loss_file = f.read()
pattern = r"\((\d+\.\d+)"
loss_pattern = r"\((\d+\.\d+)"
epochs_pattern = r"Epoche: *(\d+)"
loss_values = re.findall(loss_pattern, loss_file)
#np.array(loss_values)
#print(loss_values)
epochs = re.findall(epochs_pattern, loss_file)
#np.array(epochs)
#print(epochs)
matches = re.findall(pattern, loss_file)
print(matches)
plt.ylabel("Loss")
plt.xlabel("Epochs")
plt.title("Loss of Baselines")
#plt.legend()
plt.plot()
plt.plot(epochs, loss_values[:25])
plt.show()
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