@ml2024 ml2024 / graph_turi.py
Created at Wed Jun 05 18:35:58 JST 2024
graph_turi.py
Raw
import numpy as np
import matplotlib.pyplot as plt
 
data01_axis1, data01_value1 = np.loadtxt("./kari2.txt", delimiter="|", usecols=range(1,3), unpack=True)
 
fig = plt.figure(figsize=(10, 6))
ax = fig.add_subplot(111)
ax.plot(data01_axis1, data01_value1, ".-", color="k", label="value1 of data01")
# ax.set_xlim(1000, 3000)
ax.set_xlabel("iterations")
ax.set_ylabel("Loss")
ax.legend(loc="upper left")
plt.show()
 
##+--------------+--------------+--------------+
##| Iteration    | Loss         | Elapsed Time |
##+--------------+--------------+--------------+
# | 1            | 3.34944      | 1.84s        |
# | 2            | 3.3227       | 2.36s        |
# | 3            | 3.31806      | 2.86s        |
# | 4            | 3.26582      | 3.33s        |
# | 5            | 3.19236      | 3.79s        |