{"id":40125,"date":"2016-04-04T23:00:20","date_gmt":"2016-04-04T20:00:20","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=40125"},"modified":"2019-06-08T06:00:25","modified_gmt":"2019-06-08T03:00:25","slug":"visualizing-tensorflow-graphs-with-tensorboard","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/","title":{"rendered":"Visualizing TensorFlow Graphs with TensorBoard"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#How_does_it_work\" >How does it work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#Launching_TensorBoard\" >Launching TensorBoard<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#Source_code\" >Source code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#Want_more_Watch_the_video\" >Want more? Watch the video!<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#Further_reading\" >Further reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"How_does_it_work\"><\/span>How does it work?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/www.tensorflow.org\/tensorboard\/get_started\" rel=\"noopener noreferrer\" target=\"_blank\">TensorBoard<\/a> helps engineers to analyze, visualize, and debug TensorFlow graphs. This tutorial will help you to get started with TensorBoard, demonstrating some of its capabilities.<\/p>\n<p>Visualizing a graph and plot metrics about its execution does not happen automatically in TensorBoard. After you add a number of functions to your source code, TensorFlow will write events related to the execution of your graph to a special folder. To get started with TensorBoard, you also need to point it to the folder with these events.<\/p>\n<p>The <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">EVENTS<\/code>, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">IMAGES<\/code>, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">GRAPH<\/code>, and <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">HISTOGRAMS<\/code> tabs in the upper right corner of TensorBoard represent the types of data that you can collect during graph execution.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Launching_TensorBoard\"><\/span>Launching TensorBoard<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#8217;s try an example that demonstrates TensorFlow debugging features using <a href=\"https:\/\/www.altoros.com\/blog\/using-logistic-and-softmax-regression-with-tensorflow\/\">the softmax regression algorithm<\/a>.<\/p>\n<p>To collect data about a particular node of a TensorFlow graph, you can refer to one of the <a href=\"https:\/\/www.tensorflow.org\/versions\/master\/api_docs\/python\/train.html#summary-operations\" target=\"_blank\" rel=\"noopener noreferrer\">summary operations<\/a>. For example, if you want to visualize the distribution of weights or biases, you should use the <a href=\"https:\/\/www.tensorflow.org\/versions\/master\/api_docs\/python\/train.html#histogram_summary\" target=\"_blank\" rel=\"noopener noreferrer\">histogram_summary <\/a>operation.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">with tf.name_scope(&quot;Wx_b&quot;) as scope:\r\n    # Construct a linear model\r\n    model = tf.nn.softmax(tf.matmul(x, W) + b) # Softmax\r\n    \r\n# Add summary ops to collect data\r\nw_h = tf.histogram_summary(&quot;weights&quot;, W)\r\nb_h = tf.histogram_summary(&quot;biases&quot;, b)<\/pre>\n<p>Below, you will find its representation on the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">HISTOGRAMS<\/code> tab.<\/p>\n<p><center><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensorboard-histograms-tab.png\" rel=\"attachment wp-att-10494\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensorboard-histograms-tab.png\" alt=\"visualizing-graphs-with-tensorboard-histograms-tab\" width=\"640\" class=\"aligncenter size-full wp-image-40127\" \/><\/a><\/center><\/p>\n<p>For visualization of the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cost<\/code> function, we can use the  <a href=\"https:\/\/www.tensorflow.org\/versions\/master\/api_docs\/python\/train.html#scalar_summary\" target=\"_blank\" rel=\"noopener noreferrer\">scalar_summary<\/a> operation.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">with tf.name_scope(&quot;cost_function&quot;) as scope:\r\n    # Minimize error using cross entropy\r\n    # Cross entropy\r\n    cost_function = -tf.reduce_sum(y*tf.log(model))\r\n    # Create a summary to monitor the cost function\r\n    tf.scalar_summary(&quot;cost_function&quot;, cost_function)<\/pre>\n<p>Find its representation on the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">EVENTS<\/code> tab below.<\/p>\n<p><center><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensoard-board-cost-function.png\" rel=\"attachment wp-att-10495\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensoard-board-cost-function.png\" alt=\"visualizing-graphs-with-tensoard-board-cost-function\" width=\"640\" class=\"aligncenter size-full wp-image-40128\" \/><\/a><\/center><\/p>\n<p>To see the graph, click the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">GRAPH<\/code> tab on the top panel. If your graph has thousands of nodes, visualizing it on a single view is hard. To make the visualization more convenient, we can organize logically related operations into groups using <a href=\"https:\/\/www.tensorflow.org\/versions\/master\/api_docs\/python\/framework.html#name_scope\" target=\"_blank\" rel=\"noopener noreferrer\">tf.name_scope<\/a> with specific names like <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Wx_b<\/code> or <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cost_function<\/code>.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">with tf.name_scope(&quot;Wx_b&quot;) as scope:\r\n    # Construct a linear model\r\n    model = tf.nn.softmax(tf.matmul(x, W) + b) # Softmax<\/pre>\n<p>or<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">with tf.name_scope(&quot;cost_function&quot;) as scope:\r\n    # Minimize error using cross entropy\r\n    # Cross entropy\r\n    cost_function = -tf.reduce_sum(y*tf.log(model))<\/pre>\n<p><center><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensorboard-graph-tab.png\" rel=\"attachment wp-att-10496\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensorboard-graph-tab.png\" alt=\"visualizing-graphs-with-tensorboard-graph-tab\" width=\"640\" class=\"aligncenter size-full wp-image-40129\" \/><\/a><\/center><\/p>\n<p>By default, only the top of the nodes hierarchy is shown. We can click on an operation group, and it will be expanded. For example, let\u2019s click on the  <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Wx_b<\/code> group:<\/p>\n<p><center><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensorboard-wxb-group.png\" rel=\"attachment wp-att-10497\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2018\/12\/visualizing-graphs-with-tensorboard-wxb-group.png\" alt=\"visualizing-graphs-with-tensorboard-wxb-group\" width=\"640\" class=\"aligncenter size-full wp-image-40130\" \/><\/a><\/center><\/p>\n<p>Now, let\u2019s combine all <a href=\"https:\/\/www.tensorflow.org\/versions\/master\/api_docs\/python\/train.html#summary-operations\" target=\"_blank\" rel=\"noopener noreferrer\">summary operations<\/a> into a single operation with <a href=\"https:\/\/www.tensorflow.org\/versions\/master\/api_docs\/python\/train.html#merge_all_summaries\" target=\"_blank\" rel=\"noopener noreferrer\">tf.merge_all_summaries<\/a>.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\"># Merge all summaries into a single operator\r\nmerged_summary_op = tf.merge_all_summaries()<\/pre>\n<p>Then, define a folder for storing workflow events using the command below.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\"># Set the logs writer to the folder \/tmp\/tensorflow_logs\r\nsummary_writer = tf.train.SummaryWriter('\/home\/sergo\/work\/logs',graph_def=sess.graph_def)<\/pre>\n<p>After this, write an operations summary for each iteration.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">summary_str = sess.run(merged_summary_op, feed_dict={x: batch_xs, y: batch_ys})\r\nsummary_writer.add_summary(summary_str, iteration*total_batch + i)<\/pre>\n<p>Launch TensorBoard with the command below.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">tensorboard --logdir=\/home\/sergo\/work\/logs<\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Source_code\"><\/span>Source code<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can find the source code of the example below.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\"># Import MNIST data\r\nimport input_data\r\nmnist = input_data.read_data_sets(&quot;\/tmp\/data\/&quot;, one_hot=True)\r\n\r\nimport tensorflow as tf\r\n\r\n# Set parameters\r\nlearning_rate = 0.01\r\ntraining_iteration = 30\r\nbatch_size = 100\r\ndisplay_step = 2\r\n\r\n# TF graph input\r\nx = tf.placeholder(&quot;float&quot;, &#x5B;None, 784]) # mnist data image of shape 28*28=784\r\ny = tf.placeholder(&quot;float&quot;, &#x5B;None, 10]) # 0-9 digits recognition =&gt; 10 classes\r\n\r\n# Create a model\r\n\r\n# Set model weights\r\nW = tf.Variable(tf.zeros(&#x5B;784, 10]))\r\nb = tf.Variable(tf.zeros(&#x5B;10]))\r\n\r\nwith tf.name_scope(&quot;Wx_b&quot;) as scope:\r\n    # Construct a linear model\r\n    model = tf.nn.softmax(tf.matmul(x, W) + b) # Softmax\r\n    \r\n# Add summary ops to collect data\r\nw_h = tf.histogram_summary(&quot;weights&quot;, W)\r\nb_h = tf.histogram_summary(&quot;biases&quot;, b)\r\n\r\n# More name scopes will clean up graph representation\r\nwith tf.name_scope(&quot;cost_function&quot;) as scope:\r\n    # Minimize error using cross entropy\r\n    # Cross entropy\r\n    cost_function = -tf.reduce_sum(y*tf.log(model))\r\n    # Create a summary to monitor the cost function\r\n    tf.scalar_summary(&quot;cost_function&quot;, cost_function)\r\n\r\nwith tf.name_scope(&quot;train&quot;) as scope:\r\n    # Gradient descent\r\n    optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost_function)\r\n\r\n# Initializing the variables\r\ninit = tf.initialize_all_variables()\r\n\r\n# Merge all summaries into a single operator\r\nmerged_summary_op = tf.merge_all_summaries()\r\n\r\n# Launch the graph\r\nwith tf.Session() as sess:\r\n    sess.run(init)\r\n    \r\n    # Set the logs writer to the folder \/tmp\/tensorflow_logs\r\n    summary_writer = tf.train.SummaryWriter('\/home\/sergo\/work\/logs', graph_def=sess.graph_def)\r\n\r\n    # Training cycle\r\n    for iteration in range(training_iteration):\r\n        avg_cost = 0.\r\n        total_batch = int(mnist.train.num_examples\/batch_size)\r\n        # Loop over all batches\r\n        for i in range(total_batch):\r\n            batch_xs, batch_ys = mnist.train.next_batch(batch_size)\r\n            # Fit training using batch data\r\n            sess.run(optimizer, feed_dict={x: batch_xs, y: batch_ys})\r\n            # Compute the average loss\r\n            avg_cost += sess.run(cost_function, feed_dict={x: batch_xs, y: batch_ys})\/total_batch\r\n            # Write logs for each iteration\r\n            summary_str = sess.run(merged_summary_op, feed_dict={x: batch_xs, y: batch_ys})\r\n            summary_writer.add_summary(summary_str, iteration*total_batch + i)\r\n        # Display logs per iteration step\r\n        if iteration % display_step == 0:\r\n            print &quot;Iteration:&quot;, '%04d' % (iteration + 1), &quot;cost=&quot;, &quot;{:.9f}&quot;.format(avg_cost)\r\n\r\n    print &quot;Tuning completed!&quot;\r\n\r\n    # Test the model\r\n    predictions = tf.equal(tf.argmax(model, 1), tf.argmax(y, 1))\r\n    # Calculate accuracy\r\n    accuracy = tf.reduce_mean(tf.cast(predictions, &quot;float&quot;))\r\n    print &quot;Accuracy:&quot;, accuracy.eval({x: mnist.test.images, y: mnist.test.labels})<\/pre>\n<p>In brief, TensorBoard works with TensorFlow events files to visualize a graph and information related to its execution. To generate the necessary data, you can use TensorFlow summary operations.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Want_more_Watch_the_video\"><\/span>Want more? Watch the video!<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><small>In this session, <a href=\"https:\/\/www.linkedin.com\/in\/rebeccaroisin\" target=\"_blank\" rel=\"noopener noreferrer\">Rebecca Murphy<\/a> of Ocado Technology explains what <a href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/\">TensorBoard<\/a> is and how to use it for visualizing learning.<\/small><\/p>\n<p><center><script charset=\"ISO-8859-1\" src=\"\/\/fast.wistia.com\/assets\/external\/E-v1.js\" async><\/script><\/p>\n<div class=\"wistia_embed wistia_async_y307ta50tx\" style=\"height:360px;width:640px\">&nbsp;<\/div>\n<p><\/center><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Further_reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/basic-concepts-and-manipulations-with-tensorflow\/\">Basic Concepts and Manipulations with TensorFlow<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/using-linear-regression-in-tensorflow\/\">Using Linear Regression in TensorFlow<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/using-logistic-and-softmax-regression-with-tensorflow\/\">Using Logistic and Softmax Regression in TensorFlow<\/a><\/li>\n<\/ul>\n<hr \/>\n<p><center><small>This blog post was written by <a href=\"https:\/\/www.altoros.com\/blog\/author\/s-kovalev\/\">Sergey Kovalev<\/a> and then edited by <a href=\"https:\/\/www.altoros.com\/blog\/author\/sophie.turol\/\">Sophia Turol<\/a> and <a href=\"https:\/\/www.altoros.com\/blog\/author\/alex\/\">Alex Khizhniak<\/a>.<\/small><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How does it work?<\/p>\n<p>TensorBoard helps engineers to analyze, visualize, and debug TensorFlow graphs. This tutorial will help you to get started with TensorBoard, demonstrating some of its capabilities.<\/p>\n<p>Visualizing a graph and plot metrics about its execution does not happen automatically in TensorBoard. After you add a number of functions to [&#8230;]<\/p>\n","protected":false},"author":122,"featured_media":40155,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[748,749],"class_list":["post-40125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-machine-learning","tag-tensorflow"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Visualizing TensorFlow Graphs with TensorBoard | Altoros<\/title>\n<meta name=\"description\" content=\"With the sample source code, this blog post shows how to launch TensorBoard and use a set of operations for graph visualization in TensorFlow.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Visualizing TensorFlow Graphs with TensorBoard | Altoros\" \/>\n<meta property=\"og:description\" content=\"How does it work? TensorBoard helps engineers to analyze, visualize, and debug TensorFlow graphs. This tutorial will help you to get started with TensorBoard, demonstrating some of its capabilities. Visualizing a graph and plot metrics about its execution does not happen automatically in TensorBoard. After you add a number of functions to [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-04T20:00:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-08T03:00:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"307\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Sergey Kovalev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sergey Kovalev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/\",\"name\":\"Visualizing TensorFlow Graphs with TensorBoard | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif\",\"datePublished\":\"2016-04-04T20:00:20+00:00\",\"dateModified\":\"2019-06-08T03:00:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/7bb3c35a84eeaa32af69b53773e7fe1a\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif\",\"width\":640,\"height\":307},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Visualizing TensorFlow Graphs with TensorBoard\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/7bb3c35a84eeaa32af69b53773e7fe1a\",\"name\":\"Sergey Kovalev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/3faf706-150x150.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/3faf706-150x150.jpg\",\"caption\":\"Sergey Kovalev\"},\"description\":\"Sergey Kovalev is a senior software engineer with extensive experience in high-load application development, big data and NoSQL solutions, cloud computing, data warehousing, and machine learning. He has strong expertise in back-end engineering, applying the best approaches for development, architecture design, and scaling. He has solid background in software development practices, such as the Agile methodology, prototyping, patterns, refactoring, and code review. Now, Sergey\u2019s main interest lies in big data distributed computing and machine learning.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/s-kovalev\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Visualizing TensorFlow Graphs with TensorBoard | Altoros","description":"With the sample source code, this blog post shows how to launch TensorBoard and use a set of operations for graph visualization in TensorFlow.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/","og_locale":"en_US","og_type":"article","og_title":"Visualizing TensorFlow Graphs with TensorBoard | Altoros","og_description":"How does it work? TensorBoard helps engineers to analyze, visualize, and debug TensorFlow graphs. This tutorial will help you to get started with TensorBoard, demonstrating some of its capabilities. Visualizing a graph and plot metrics about its execution does not happen automatically in TensorBoard. After you add a number of functions to [...]","og_url":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/","og_site_name":"Altoros","article_published_time":"2016-04-04T20:00:20+00:00","article_modified_time":"2019-06-08T03:00:25+00:00","og_image":[{"width":640,"height":307,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif","type":"image\/gif"}],"author":"Sergey Kovalev","twitter_misc":{"Written by":"Sergey Kovalev","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/","url":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/","name":"Visualizing TensorFlow Graphs with TensorBoard | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif","datePublished":"2016-04-04T20:00:20+00:00","dateModified":"2019-06-08T03:00:25+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/7bb3c35a84eeaa32af69b53773e7fe1a"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/04\/visualizing-graphs-with-tensorboard-tensorflow-machine-learning-v1.gif","width":640,"height":307},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/visualizing-tensorflow-graphs-with-tensorboard\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Visualizing TensorFlow Graphs with TensorBoard"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/7bb3c35a84eeaa32af69b53773e7fe1a","name":"Sergey Kovalev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/3faf706-150x150.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/3faf706-150x150.jpg","caption":"Sergey Kovalev"},"description":"Sergey Kovalev is a senior software engineer with extensive experience in high-load application development, big data and NoSQL solutions, cloud computing, data warehousing, and machine learning. He has strong expertise in back-end engineering, applying the best approaches for development, architecture design, and scaling. He has solid background in software development practices, such as the Agile methodology, prototyping, patterns, refactoring, and code review. Now, Sergey\u2019s main interest lies in big data distributed computing and machine learning.","url":"https:\/\/www.altoros.com\/blog\/author\/s-kovalev\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/40125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/122"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=40125"}],"version-history":[{"count":15,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/40125\/revisions"}],"predecessor-version":[{"id":44053,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/40125\/revisions\/44053"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/40155"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=40125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=40125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=40125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}