【发布时间】:2020-05-24 22:15:48
【问题描述】:
当尝试打开 tesnorflow 时,我只得到一个木板页面:
这是它在 Firefox 中的样子:
我在 chrome 控制台中收到错误消息:
Refused to execute script from 'http://localhost:6006/index.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
在 Firefox 控制台中,我收到错误消息:
The resource from “http://localhost:6006/index.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)
和
Loading failed for the <script> with source “http://localhost:6006/index.js”.
我试过了:
Unable to open Tensorboard in browser
Tensorboard get blank page
我在控制台输入:
tensorboard --logdir=runs --bind_all
tensorboard --logdir=./runs --bind_all
tensorboard --logdir=./runs/ --bind_all
tensorboard --logdir=./runs --host localhost --port 6006
tensorboard --logdir=./runs --host localhost
tensorboard --logdir=./runs --port 6006 --bind_all
我有张量板版本:2.1.0 我像这样生成了我的数据:
train_set = torchvision.datasets.FashionMNIST(
root="./data/FashionMNIST",
train=True,
download=True,
transform=transforms.Compose([
transforms.ToTensor()
])
)
train_loader = torch.utils.data.DataLoader(train_set, batch_size=1000)
tb = SummaryWriter()
network = Network()
images, labels = next(iter(train_loader))
grid = torchvision.utils.make_grid(images)
tb.add_image("image", grid)
tb.add_graph(network, images)
tb.close()
我遵循了这个教程:TensorBoard with PyTorch - Visualize Deep Learning Metrics
【问题讨论】:
-
有一个建议的解决方案here 特别是关于“启用严格的 MINE 类型检查”错误。如果您使用的是 Windows,它看起来可能与错误的注册表项有关。
-
非常感谢,已经解决了。如果您将其发布为答案,我会接受。不知道你是怎么发现的。
-
感谢@Lupos 我使用与此处显示的错误相关的各种谷歌搜索词偶然发现了这个解决方案。我不记得我用哪个搜索词找到这篇文章了。
标签: python-3.x tensorflow pytorch tensorboard