how to use tensorboard to visualize the trained tensorflow model?

3,014 views
Skip to first unread message

chit...@gmail.com

unread,
Aug 27, 2017, 11:52:02 PM8/27/17
to Discuss
HI

I read the tutorial of Tensorflow about how to run model and visualize the model online, and it need a log directory to start tensorboard script.
but there is a question, for a trained model from others, how can I visualize it? you know, there is no log anymore, the distributor would not pack
the log directory with model.

Sebastian Raschka

unread,
Aug 28, 2017, 12:57:32 AM8/28/17
to chit...@gmail.com, TensorFlow Mailinglist
if you just want to take a look at the graph you could simply import the graph of the trained model and use the filewriter to create a log dir. E.g.,

g = tf.Graph()

with g.as_default() as g:
tf.train.import_meta_graph('my-model.meta')

with tf.Session(graph=g) as sess:
file_writer = tf.summary.FileWriter(logdir='logs/my-model', graph=g)


Not sure what information is contained in the checkpoint files though, and if it's possible to visualize other stats that may have been created during training like via tf.summary.scalar or tf.summary.histogram if you don't have access to the "logdir."

Best,
Sebastian
> --
> You received this message because you are subscribed to the Google Groups "Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
> To post to this group, send email to dis...@tensorflow.org.
> To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/9ed1a60f-a2c2-429f-9f8c-7ca99b832c22%40tensorflow.org.

edward lee

unread,
Aug 28, 2017, 3:26:00 AM8/28/17
to Sebastian Raschka, chit...@gmail.com, TensorFlow Mailinglist
In tensorflow , is the weight always be restricted to be less or equals to "1" or there is no restriction?

Sent from my iPhone

> On Aug 27, 2017, at 9:57 PM, Sebastian Raschka <se.ra...@gmail.com> wrote:
>
> during

Sebastian Raschka

unread,
Aug 28, 2017, 12:54:16 PM8/28/17
to Liwei Dai, TensorFlow Mailinglist
> So, one has to have the *.meta file in order to import the graph?

Yeah, I guess. This would be the easiest way to do it as far as I know. I assumed this would be available due to " for a trained model from others" (otherwise, you can of course also visualize the graph if you build it from the code def).

> In tensorflow , is the weight always be restricted to be less or equals to "1" or there is no restriction?

Wrong thread?

Best,
Sebastian



> On Aug 28, 2017, at 1:25 AM, Liwei Dai <deliv...@gmail.com> wrote:
>
> So, one has to have the *.meta file in order to import the graph?
> To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/26B09F88-3561-48C5-9E7D-0771BE832E69%40gmail.com.
>

aqil....@gmail.com

unread,
Dec 4, 2017, 2:20:47 AM12/4/17
to Discuss
How about visualize the learning rate of the trained model? the graph show but learning rate doesnt come out.
Reply all
Reply to author
Forward
0 new messages