Skip to main content

HowTo: Start TensorBoard in a container - ML experiment visualization tool

In order to increase the recognition accuracy of machine learning models, observing model training changes and removing errors are all necessary but complicated tasks. TensorBoard visualizes the changes of TensorFlow model data in the form of a web page, and have the ability to draw a variety of graphics, allowing data scientists to easily examine and understand the structure of the neural network and experimental results, also quickly find solutions to optimize the model.

TensorBoard has been installed in the TWSC container environment for users. This article will show you how to start the TensorBoard tool. For more introduction and usage of Tensorboard, please refer to TensorFlow Official website.

tip

It is recommended to start in the TensorFlow container to better utilize the functionality of TensorBoard, which will be limited in other containers.


Step 1. Connect to your Interactive Container

Please refer to the Connection method to connect to your Interactive Container.


Step 2. Activate TensorBoard

Enter the following command to activate the TensorBoard service.

tensorboard --logdir=~/logdir --port 5000

info
  1. You need to specify a port for TensorBoard web services.
    In the container environment of TWSC, there are three ports available, namely 5000, 5001, and 5002. Here we take port 5000 as an example.
    For more information, please refer to Configure the service port of Interactive Containers.
  2. The --logdir in the above command is the storage location of the log file, you can set it by yourself. In this article, we use ~/logdir as an example.

Step 3. Associate container service ports

Please associate the port used by TensorBoard with the container port, and then you can use the TensorBoard service from your local web page.

  • On the TWSC container information page, click Associate.

  • In the Association Service Port selection window, select 5000 and click OK.

  • After confirmation, the Port on the container information page will show one more piece of information about the target port 5000 and the public port. Take the following figure as an example, the public port of target port 5000 is 56674.


Step 4. Connect to Tensorboard

  • Get the container's Public IP on the container information page.

  • Open the web browser and enter Container IP: Public Port in the address bar, such as xxx.xxx.xxx.xxx:56674 in this example, then you can connect to Tensorboard.


info

For more Tensorboard introduction and usages, please refer to TensorFlow official website.