def animate(i): embed = embeddings[i].detach().cpu().numpy() ax.clear() ax.scatter(embed[:, 0], embed[:, 1], embed[:, 2], s=200, c=data.y, cmap="hsv", vmin=-2, vmax=3) plt.title(f'Epoch {i} | Loss: {losses[i]:.2f} | Acc: {accuracies[i]*100:.2f}%', fontsize=18, pad=40)