In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to realize the visualization of TensorBoard computing chart". In the daily operation, I believe that many people have doubts about how to realize the visualization of TensorBoard computing chart. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to realize the visualization of TensorBoard computing chart". Next, please follow the editor to study!
Brief introduction
Tensorflow supporting visualization tools to draw your computing picture.
When training a huge network, computational diagrams are complex and confusing. TensorBoard provides a series of components, you can see changes in learning rate, see changes in objective function.
Tfboard reads the events files you wrote down during the tf runtime for visualization. These events files contain the summary data you wrote down, which is in protobuffer format, not a text file.
Estimator style is recommended.
Classes and methods
Under the tf.estimator framework, methods such as tf.summary.scalar () can be used directly without having to explicitly create writer and call writer.add_summary ()
Tensorflow.python.summary.writer.writer.FileWriter (SummaryToEventTransformer)
Class.
_ _ init__ (self, logdir, graph=None,...)
Constructor, Creates a FileWriter and an event file.
Tensorflow.python.summary.summary
Module.
Scalar (name, tensor,..) Outputs a Summary protocol buffer containing a single scalar value.
Histogram (name, values, collections=None, family=None) Adding a histogram summary makes it possible to visualize your data's distribution in TensorBoard.
Image
For grap-scale diagrams, 0 is all black and 255 is all white.
Api, image (name, tensor, max_outputs=3, collections=None, family=None) Outputs a Summary protocol buffer with images. Images are built from tensor which must be 4murd with shape [batch_size, height, width, channels] and where channels can be:
1.1-tensor is interpreted as Grayscale.
2.3-tensor is interpreted as RGB.
3.4-tensor is interpreted as RGBA.
Tensor is float: in this case, tf will be normalized internally and converted to [0255] (it can be verified by parsing tf_events). Float usually corresponds to the probability after softm, with a range of [0mem1].
Tensor is uint8, which remains unchanged, and tf does not make any internal conversion.
Attention visualization, the weight of attention will be soft-max processing, usually img display effect is that a line looks dark and light, the whiter the color, the bigger the weight. But sometimes after tf internal regularization does not meet expectations, there is a line of all-white situation, for the sake of safety to change to unit type.
Open the web page
Type tensorboard-- logdir=D:\ tf_models\ iris on the command line and open URL when prompted.
For example, mine is http://yichu-amd:6006/..
Effect screenshot
Figure 3-1 Files in logdir
Figure 3-2 cool visualization
Visualization of figure 3-3 Computing Chart
Give some advice:
The network is also modular and structured, and the rational use of scope can make the calculation diagram clear and elegant.
Some tensor comes from dataset, some from the output of op operation in api, and there is no clear name itself. At this time, the tensor is named with x=tf.identity (x _ description _ name') to facilitate the calculation of the location in the diagram. The memory in figure 3-3 is the tensor of the output of encoder.
At this point, the study on "how to realize the visualization of TensorBoard computing graph" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.