Graph visualisaton is not showing in tensorboard for seq2seq model

僤鯓⒐⒋嵵緔 提交于 2019-12-06 07:01:34

问题


I build a seq2seq model using the seq2seq.py library provided with tensorflow. Before training anything I wanted to visualize the graph network of my untrained model in tensorboard, but it does not want to display this.

Below a minimal example to reproduce my problem. Anybody an idea why this does not work? Can you only visualize a grap of a model after it has been trained?

import tensorflow as tf
import numpy as np
from tensorflow.models.rnn import rnn_cell
from tensorflow.models.rnn import seq2seq

encoder_inputs = []
decoder_inputs = []

for i in xrange(350):  
    encoder_inputs.append(tf.placeholder(tf.float32, shape=[None,2],
                                              name="encoder{0}".format(i)))

for i in xrange(45):
    decoder_inputs.append(tf.placeholder(tf.float32, shape=[None,22],
                                         name="decoder{0}".format(i)))

size = 512 # number of hidden units
num_layers = 2 # Number of LSTMs
single_cell = rnn_cell.BasicLSTMCell(size)
cell = rnn_cell.MultiRNNCell([single_cell] * num_layers)
model = seq2seq.basic_rnn_seq2seq(encoder_inputs, decoder_inputs,cell)

sess = tf.Session()
sess.run(tf.variables.initialize_all_variables())
summary_writer = tf.train.SummaryWriter('/path/to/log', graph_def = sess.graph_def)

回答1:


It looks like this might be related to a bug where the graph visualization does not work in the firefox browser. Try using chrome or safari if possible.

https://github.com/tensorflow/tensorflow/issues/650



来源:https://stackoverflow.com/questions/33773271/graph-visualisaton-is-not-showing-in-tensorboard-for-seq2seq-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!