Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow Eager and Tensorboard Graphs?

I'm currently looking over the Eager mode in Tensorflow and wanted to know if I can extract the graph to use in Tensorboard. I understand that Tensorflow Eager mode does not really have a graph or session system that the user has to create. However, from my understanding there is one under the hood. Could this hidden Graph and Session be exported to support a visual graph view in Tensorboard? Or do I need to redo my model into a Graph/Session form of execution?

like image 794
NateAGeek Avatar asked May 09 '18 16:05

NateAGeek


People also ask

Is eager execution slower?

Eager execution is slower than graph execution! Since eager execution runs all operations one-by-one in Python, it cannot take advantage of potential acceleration opportunities. Graph execution extracts tensor computations from Python and builds an efficient graph before evaluation.

How do you plot a TensorBoard graph?

Select the Graphs dashboard by tapping “Graphs” at the top. You can also optionally use TensorBoard. dev to create a hosted, shareable experiment. By default, TensorBoard displays the op-level graph.

What is eager execution mode in TensorFlow?

With eager execution enabled, TensorFlow functions execute operations immediately (as opposed to adding to a graph to be executed later in a tf. compat. v1. Session ) and return concrete values (as opposed to symbolic references to a node in a computational graph).

Is eager execution default in TensorFlow?

Eager execution is enabled by default and this API returns True in most of cases.


1 Answers

No, by default there is no graph nor sessions in eager executing, which is one of the reasons why it is so appealing. You will need to write code that is compatible with both graph and eager execution to write your net's graph in graph mode if you need to.

Note that even though you can use Tensorboard in eager mode to visualize summaries, good ol' tf.summary.FileWriter is incompatible with eager execution: you need to use tf.contrib.summary.create_file_writer instead (works in graph mode too, so you won't have to change your code).

like image 86
P-Gn Avatar answered Sep 28 '22 01:09

P-Gn