Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use MXNet to realize data Visualization in MXBoard

Shulou Source: shulou.com Published: 2022-06-02 05:40:51 10月03日 Update

This article shows you how to use MXNet to achieve data visualization in MXBoard, the content is concise and easy to understand, it can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Installation tutorial

Install MXNet

1pip install mxnet-cu80-the environment of pre # Amusi is CUDA8.0

Install MXBoard

1pip install mxboard

Install TensorBoard

1pip install tensorflow-gpu==1.4 tensorboard # Amusi specifies the TensorFlow version

Note: to visualize data in a browser, MXBoard must also rely on TensorBoard, so you also need to download and install TensorFlow and TensorBoard (TensorFlow is really NB)

Test TensorBoard

1tensorboard-help

If the installation is successful, a bunch of instruction prompts for tensorboard will be output, as shown in the following figure:

Testing: using MXBoard to visualize MXNet data

Create a new Python script file and name it MXBoard-Test.py

1import mxnet as mx

2from mxboard import SummaryWriter

three

4with SummaryWriter (logdir='./logs') as sw:

5 for i in range (10):

6 # create a normal distribution with fixed mean and decreasing std

7 data = mx.nd.normal (loc=0, scale=10.0/ (iTun1), shape= (10,3,8,8))

8 sw.add_histogram (tag='norml_dist', values=data, bins=200, global_step=i)

Run the script file to generate a logs folder under the same path, as shown in the following figure:

Open the terminal and switch to visualization using TensorBoard

1tensorboard-logdir=./logs-host=127.0.0.1-port=8888

According to the output prompt, copy and paste the http://127.0.0.1:8888 URL into the Chrome browser

The above is how to use MXNet to achieve data visualization in MXBoard. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Visualization data files content skills browsers knowledge scripts prompts testing browsing output concise successful concise information available that is instructions tutorials Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi MySQL macOS Linux