Spaces:
Sleeping
Sleeping
File size: 502 Bytes
bec1ee5 6e6a688 bec1ee5 6e6a688 bec1ee5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
sns.set()
def loss_history_plt(loss_history: list) -> None:
fig, ax = plt.subplots()
def animate(i):
ax.clear()
sns.lineplot(
x=range(i),
y=loss_history[:i],
ax=ax,
)
ax.set_xlabel("Epoch")
ax.set_ylabel("Training Loss")
_ = FuncAnimation(fig, animate, frames=len(loss_history), interval=100)
plt.show()
|