GitBucket
Pull requests
Issues
Snippets
Sign in
ml2024
/
graph_turi.py
Fork
0
Created at Wed Jun 05 18:35:58 JST 2024
Download ZIP
HTTP
Embed
Embed this snippet in your website.
HTTP
Clone with Git using the repository's web address.
Code
Revision
Forks
takane
revised this
on 5 Jun 2024
c23acfa
graph_turi.py
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 |