展示wandb的数据

import wandb
import matplotlib.pyplot as plt

# 初始化 wandb API
api = wandb.Api()

# 假设您想要访问的项目名为 'my_project',并且您的 wandb 用户名为 'my_username'
project_name = "aicolab/RWKV-5-Test"

# 获取项目中的runs
runs = api.runs(project_name)

# 假设您只关心第一个run
run = runs[0]

# 获取特定run的所有数据(例如,损失和准确度)
# 这里我们获取 'loss' 和 'accuracy' 作为示例
history = run.history()

# 绘制图表
plt.figure(figsize=(10, 4))

# 绘制损失图
plt.subplot(1, 2, 1)
plt.plot(history["loss"])
plt.title("Loss over Time")
plt.xlabel("Epoch")
plt.ylabel("Loss")

# 绘制准确度图
plt.subplot(1, 2, 2)
plt.plot(history["lr"])
plt.title("lr over Time")
plt.xlabel("Epoch")
plt.ylabel("lr")

plt.tight_layout()
plt.show()

在这里插入图片描述

在这里插入图片描述

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-02-10 20:26:01       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-02-10 20:26:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-02-10 20:26:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-02-10 20:26:01       18 阅读

热门阅读

  1. 【机器学习笔记】贝叶斯学习

    2024-02-10 20:26:01       25 阅读
  2. 264. 丑数 II

    2024-02-10 20:26:01       31 阅读
  3. 某magnet搜索接口

    2024-02-10 20:26:01       24 阅读
  4. 5. 最长回文子串

    2024-02-10 20:26:01       31 阅读
  5. Vue 前置导航

    2024-02-10 20:26:01       23 阅读
  6. C#系列-访问SqlServer+Mysql+Oracle数据库(6)

    2024-02-10 20:26:01       29 阅读
  7. C语言变量与常量..

    2024-02-10 20:26:01       25 阅读
  8. 双频路由原理

    2024-02-10 20:26:01       27 阅读
  9. PYTHON 120道题目详解(52-54)

    2024-02-10 20:26:01       27 阅读