在浏览器上加载后,tensorboard不显示

时间:2017-07-28 18:05:17

标签: python tensorflow neural-network tensorboard

我正在实施一个GAN来生成假推文。我想使用Tensorboard可视化我的模型,但它没有显示任何内容。这是我第一次使用Tensorboard,我在YouTube上关注了一个教程(https://gist.github.com/dandelionmane/4f02ab8f1451e276fea1f165a20336f1#file-mnist-py)。当我运行func roundedImage(image: UIImage, completion: @escaping ((UIImage?)->(Void))) { DispatchQueue.global().async { // Begin a new image that will be the new image with the rounded corners // (here with the size of an UIImageView) UIGraphicsBeginImageContextWithOptions(image.size, false, image.scale) let rect = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height) // Add a clip before drawing anything, in the shape of an rounded rect UIBezierPath(roundedRect: rect, cornerRadius: image.size.width/2).addClip() // Draw your image image.draw(in: rect) // Get the image, here setting the UIImageView image guard let roundedImage = UIGraphicsGetImageFromCurrentImageContext() else { print("UIGraphicsGetImageFromCurrentImageContext failed") completion(nil) return } // Lets forget about that we were drawing UIGraphicsEndImageContext() DispatchQueue.main.async { completion(roundedImage) } } } 时,它给了我一个端口,这个端口将我带到Tensorboard,但没有显示任何内容。以下是我的代码。谢谢! 代码已删除 它很长,请ctrl-F找到与Tensorboard相关的行。

1 个答案:

答案 0 :(得分:0)

在定义图表后,您需要添加以下行:

writer.add_graph(sess.graph)

查看文档here

看看这个问题:

How to create a Tensorflow Tensorboard Empty Graph

相关问题