diff --git a/DATA_MNIST/PyTorch_Non_Spike_Network/Error.png b/DATA_MNIST/PyTorch_Non_Spike_Network/Error.png new file mode 100644 index 0000000..ee326fe Binary files /dev/null and b/DATA_MNIST/PyTorch_Non_Spike_Network/Error.png differ diff --git a/DATA_MNIST/PyTorch_Non_Spike_Network/events.out.tfevents.1651325827.fedora.115860.0 b/DATA_MNIST/PyTorch_Non_Spike_Network/events.out.tfevents.1651325827.fedora.115860.0 new file mode 100644 index 0000000..af6401f Binary files /dev/null and b/DATA_MNIST/PyTorch_Non_Spike_Network/events.out.tfevents.1651325827.fedora.115860.0 differ diff --git a/DATA_MNIST/PyTorch_Non_Spike_Network/plot.py b/DATA_MNIST/PyTorch_Non_Spike_Network/plot.py new file mode 100644 index 0000000..1ef1a33 --- /dev/null +++ b/DATA_MNIST/PyTorch_Non_Spike_Network/plot.py @@ -0,0 +1,31 @@ +import os + +os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" + +import numpy as np +import matplotlib.pyplot as plt +from tensorboard.backend.event_processing import event_accumulator + +filename: str = "events.out.tfevents.1651325827.fedora.115860.0" + +acc = event_accumulator.EventAccumulator(filename) +acc.Reload() + +# What is available? +# available_scalar = acc.Tags()["scalars"] +# print("Available Scalars") +# print(available_scalar) + +which_scalar: str = "Test Number Correct" +te = acc.Scalars(which_scalar) + +temp: list = [] +for te_item in te: + temp.append((te_item[1], te_item[2])) +temp_np = np.array(temp) + +plt.semilogy(temp_np[:, 0], (1.0 - (temp_np[:, 1] / 10000)) * 100) +plt.xlabel("Epochs") +plt.ylabel("Error [%]") +plt.savefig("Error.png") +plt.show()