[![Build Status](https://travis-ci.org/PaddlePaddle/VisualDL.svg?branch=develop)](https://travis-ci.org/PaddlePaddle/VisualDL) [![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://github.com/PaddlePaddle/VisualDL/tree/develop/docs) [![Release](https://img.shields.io/github/release/PaddlePaddle/VisualDL.svg)](https://github.com/PaddlePaddle/VisualDL/releases) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
# ## Introduction VisualDL is a deep learning visualization tool that can help design deep learning jobs. It includes features such as scalar, parameter distribution, model structure and image visualization. Currently it is being developed at a high pace. New features will be continuously added. At present, most DNN frameworks use Python as their primary language. VisualDL supports Python by nature. Users can get plentiful visualization results by simply add a few lines of Python code into their model before training. Besides Python SDK, VisualDL was writen in C++ on the low level. It also provides C++ SDK that can be integrated into other platforms. ## Component VisualDL now provides 4 components: - graph - scalar - image - histogram ### Graph Graph is compatible with ONNX ([Open Neural Network Exchange](https://github.com/onnx/onnx)), Cooperated with Python SDK, VisualDL can be compatible with most major DNN frameworks, including PaddlePaddle, PyTorch and MXNet.
### Scalar Scalar can be used to show the trends of error during training.
### Image Image can be used to visualize any tensor or intermediate generated image.
### Histogram Histogram can be used to visualize parameter distribution and trends for any tensor.
## Quick Start To give the VisualDL a quick test, please use the following commands. ``` # Install the VisualDL. Preferably under a virtual environment. pip install --upgrade visualdl # run a demo, vdl_create_scratch_log will create logs for testing. vdl_create_scratch_log visualDL --logdir=scratch_log --port=8080 # visit http://127.0.0.1:8080 ``` ## SDK VisualDL provides both Python SDK and C++ SDK in order to fit more use cases. ### Python SDK Below is an example of creating a simple Scalar component and inserting data from different timestamps: ```python import random from visualdl import LogWriter logdir = "./tmp" logger = LogWriter(logdir, sync_cycle=10) # mark the components with 'train' label. with logger.mode("train"): # create a scalar component called 'scalars/scalar0' scalar0 = logger.scalar("scalars/scalar0") # add some records during DL model running. for step in range(100): scalar0.add_record(step, random.random()) ``` ### C++ SDK Here is the C++ SDK identical to the Python SDK example above: ```c++ #include