Tensorboard how to start in a Mac OS x system environment

Source: Internet
Author: User
Tags macbook

Again must write a blog, once to explain this open tensorboard difficult road, met a lot of mistakes, really go a lot of detours, finally solved

At first, always error, do not know why, in fact, I did not understand the principle of the impulse began to greet the painting scoop, the results of the pain is inevitable to find the wrong

This is the initial error of the contents of the file, of course, I did not know at first, should write a program to write to a logs folder, so you can not find the logs file, so it is impossible to perform success.

Now explain the steps to start Tensorboard:

1. First set up a test program shl-macbook-pro-3: Vi_python mac$ ls

dtree.py dtree.pyc logs tensorboard_graph.py TF.PYSHL-macbook-pro-3: Vi_python mac$ VI tf.py

# Here's the code for the test

#!/usr/bin/env pythonImportTensorFlow as Tfwith tf.name_scope ('INPUT1'): Input1=tf.constant ([1.0,2.0,3.0],name="INPUT1") with Tf.name_scope ('Input2'): Input2=TF. Variable (Tf.random_uniform ([3]), name="Input2") Output=tf.add_n ([input1,input2],name="Add") Writer=tf.summary.filewriter (R"logs/", Tf.get_default_graph ()) Writer.close ()

"""
The above is the code I used to test, and then I put the visual data
"""

2. After editing the data to be visualized, enter the following command under Terminal (my visual data file is named tf.py)

$ Python3 tf.py

After executing the command, a logs folder is generated tf.py the folder where the file is located.

The next time an event file is generated in the Logs folder

3 successfully generated event files, you can do Tensorboard visualization

Under Terminal, enter the following command: (at this point the path behind logdir= logs the previous layer of the folder)

$ tensorboard--logdir=users/mac/downloads/python and Cplus coding in VI mode

The following result occurs when the command executes:

4. Then add the address:

http://shl-MacBook-Pro-3.local:6006

Copied to the browser, you can open the Tensorboard, the effect is as follows:

The above is the right open posture of tensorboard, you get it?

Tensorboard how to start in a Mac OS x system environment

Related Article

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.