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 @@ ...@@ -2,16 +2,29 @@
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import re import re
import numpy as np
with open("output_loss_epoch_data.txt", "r") as f: with open("output_loss_epoch_data.txt", "r") as f:
loss_file = f.read() loss_file = f.read()
pattern = r"\((\d+\.\d+)" loss_pattern = r"\((\d+\.\d+)"
matches = re.findall(pattern, loss_file) epochs_pattern = r"Epoche: *(\d+)"
print(matches)
loss_values = re.findall(loss_pattern, loss_file)
#np.array(loss_values)
#print(loss_values)
plt.plot() epochs = re.findall(epochs_pattern, loss_file)
#np.array(epochs)
#print(epochs)
plt.ylabel("Loss")
plt.xlabel("Epochs")
plt.title("Loss of Baselines")
#plt.legend()
plt.plot(epochs, loss_values[:25])
plt.show() plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment