SuperAPI AI 工具集

tensorboard

测试与质量

查看项目

更新于 10-15 19:53

技能介绍

用途:TensorBoard 是机器学习可视化工具包,用于可视化损失、准确率等训练指标,借助直方图与分布调试模型,跨多次运行对比实验,查看模型图与架构,将嵌入投影到低维(t-SNE、PCA),跟踪超参数实验,分析性能瓶颈,并在训练中可视化图像与文本。

主要能力:标量记录(add_scalar/add_scalars)、图像记录(add_image)、直方图(add_histogram)、模型图(add_graph)、嵌入投影(add_embedding)、超参数调优(add_hparams)、文本记录(add_text)、PR 曲线(add_pr_curve),以及 TensorFlow Profiler 与 PyTorch Profiler 性能分析。

使用方式:安装 pip install tensorboard;PyTorch 集成 pip install torch torchvision tensorboard;TensorFlow 集成 pip install tensorflow。启动 tensorboard --logdir=runs,访问 http://localhost:6006。PyTorch 使用 torch.utils.tensorboard 的 SummaryWriter 记录;TensorFlow/Keras 使用 tf.keras.callbacks.TensorBoard 回调。

适用场景:训练监控、模型调试、多实验对比、嵌入可视化、超参数搜索、性能剖析。

限制:资料未提供收费、价格与平台支持等具体信息;日志记录过频会产生大文件,建议合理控制频率并及时关闭 writer。