在 GCE 中查看 运行 的 tensorboard 输出

Viewing tensorboard output from scrip that is running in GCE

我在 GCE 中有一段 python 代码 运行ning 可以在一些图像上训练一个简单的 keras 模型。我还提供了张量板回调。现在我想查看这个张量板日志的输出。由于张量板日志文件在 GCE 上,我该如何处理?

I 运行 tensorboard -logdir logs 得到输出:

TensorBoard 1.7.0 at http://instance_1:6006 (Press CTRL+C to quit)

将地址输入浏览器无效,我想知道是否可以查看此输出。

我的建议是将 tensorboard 端口暴露给 public 并阻止防火墙上的访问,仅允许使用您的 IP 访问。

为此,您需要为允许 public IP 访问 TCP 端口 6006 的实例创建防火墙规则。您有在 GCP here 上添加防火墙规则的指南。

现在执行以下命令暴露tensorboard端口:

tensorboard --logdir --host 0.0.0.0 --port 6006

您可以使用$ netstat -plunt确保端口公开。

现在去 http://$PUBLIC_IP_OF_instance_1:6006 .