Tensorboard显示空白页(由于其MIME类型,拒绝从'http:// localhost:6006 / index.js'执行脚本)

问题描述 投票:0回答:1

[当尝试打开tesnorflow时,我只得到一个木板页面:enter image description here

这是在Firefox中的外观:

enter image description here

我在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 browserTensorboard 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

python-3.x tensorflow pytorch tensorboard
1个回答
0
投票

报告了类似的错误和解决方法here

显然,这与Windows注册表中的某些问题有关。根据评论,这似乎是解决方案

就我而言,以下过程解决了问题:

  1. Windows + R和注册表编辑器
  2. [您的计算机] \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes.js
  3. 将内容类型从“文本/纯文本”更改为“应用程序/ javascript”
© www.soinside.com 2019 - 2024. All rights reserved.