Using Tensorboard analysis Cifar10 model_ google

Source: Internet
Author: User
Tags scalar
Background Tensorboard is Google's launch of a visual analysis TensorFlow graph and the running process of the tool: Tensorboard on GitHub cifar10 model is Google released a simple based on cifar10 D Models of ATA: Model on the GitHub Tensorboard key concepts and API summary Ops:tensorboard need data to visualize and analyze models, so we need to take advantage of the summary when creating model OPS writes the data we need to display in the appropriate file, and later Tensorboard reads the files. Summary ops and Tf.matmul, Tf.relu these ops are the same, we need to define in graph, then run in session, the data will be written to the summary file. Here's an example: Mnist_with_summaries Tf.summary.FileWriter: This class provides an interface to write to summary
Add_event add_graph add_summary Current Tensorboard-supported OPS for write information:
The basic steps of Tf.summary.scalar tf.summary.image Tf.summary.audio Tf.summary.text Write summary are defined as summary ops, such as: Tf.summary.scalar, TF.SUMMARY.IAMGE, etc collect all the summary ops (you can also run each summary ops individually, but let the system help us run all the more convenient): summary_op= Tf.summary.merge_all () in the session run just through the Tf.summary.merge_all rollup summary op:summary_op to write the results of the Summary_op run the file: Tf.summary.FileWriter Tensorboard Some of the more useful features select the color mode (tensorboard leftmost color option)

I'm only using these two models for the time being.
* Structure: Nodes of the same structure will appear in the same color
* Device: Ops running on the same device will appear in the same color Cifar10 model summary ops:training model:cifar10_train.py training model does not call itself tf.su Mmary. FileWriter to write information. But to give this matter to tf.train.MonitoredTrainingSession to do. Monitoredtrainningsession has two parameters to control summary
Save_summaries_steps: Every number of training step,session writes summaries to the default summary saver Save_summaries_secs: Every few seconds, Session write summaries to default summary saver Images:cifar10_input.py/_generate_image_and_label_batch
Each generated trainning batch picture, showing three images DashBoard function _activation_summary in Tensorboard:
Tensor the output of each layer of the model to a histogram display. Calculates the zero fraction of the model output and then displays the number in the scalar dashboard function _add_loss_summaries:
Show loss and exponentialmovingaverage on scalar dashboard. Function Train (Total_loss, Global_step), in this function, there is a for loop, all the trainable variable, gradients on the Histgram dashboard above show. There are also a number of TensorFlow buit-in functions that are written to the summaries, which is not analyzed one after another, such as: Tf.train.string_input_producer: Write a name for "Fraction_of_%d_full "% capacity scalar how to use Tensorboard

Command: Tensorboard–logdir=path/to/log-directory logdir: The path pointed to is Tf.summary.FileWriter write log path. If the path contains subfolders that contain different training run logs, then Tensorboard will visualize all the training run. Tensorboard The default Access port is: localhost:6006 Graph Parse Graph overview

Data processing

As you can see from the diagram above, this graph starts with string_input_producer and Fixedlengthrecordreader, generating the data that training needs to use. The data (Image,label) is finally rolled up to Shuffle_batch, and then three node uses the data:
* Conv1:our CNN Network.
* Gradients: Calculating gradient
* Cross entropy: Compute cross entropy Cross entropy

Training nodes

To avoid graph being too complex, Tensorboard introduces the function of auxiliary node: Some high-order nodes are moved to the auxiliary area on the right side of graph. Training nodes was put on this side, like CONV1. We can click on the conv1 left or right icon to jump to the link node above other dashboard Scalar, etc

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.