【问题标题】:Visualizing models, data, and training with tensorboard in pytorch在 pytorch 中使用 tensorboard 可视化模型、数据和训练
【发布时间】:2020-05-06 13:15:44
【问题描述】:

关注this Tutorial 使用 torch.utils.tensorboard 在 tensorboard 中可视化图像时出错

from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter('runs/fashion_mnist_experiment_1')
writer.add_embedding(features,
                metadata=class_labels,
                label_img=images.unsqueeze(1))
writer.close()

错误:

        AttributeError: module 'tensorflow_core._api.v2.io.gfile' has no attribute 'get_filesystem'

【问题讨论】:

标签: pytorch tensorboard


【解决方案1】:

尝试添加

writer = SummaryWriter(path)
img_grid = torchvision.utils.make_grid(torch.FloatTensor(imgs)) #imgs represent a batch of images with shape BxCxHxW
writer_add_image('images', img_grid)

来源:https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html#writing-to-tensorboard

【讨论】:

    猜你喜欢
    • 2019-12-20
    • 2020-01-26
    • 2023-02-03
    • 2019-05-04
    • 2021-07-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-11
    • 1970-01-01
    相关资源
    最近更新 更多