introduction_en.md 4.4 KB
Newer Older
1 2 3
<p align="center">
  <img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/vs-logo.png" width="60%" />
</p>
D
daminglu 已提交
4

5 6 7 8 9
# 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.
D
daminglu 已提交
10

11 12
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.
D
daminglu 已提交
13

14 15
Besides Python SDK, VisualDL was writen in C++ on the low level. It also provides C++ SDK that
can be integrated into other platforms.  
D
daminglu 已提交
16

17 18
## Why should I use VisualDL?
Visual DL has the following advantages:
D
daminglu 已提交
19

20 21 22
### Visualization
At present, most deep learning frameworks are using Python. The status of training process is recorded by logs.
This method can show short-term training status. But it can hardly show long-term trends. Visual DL can help you visualize the whole training process and construct plots as below:
D
daminglu 已提交
23
<p align="center">
24
<img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/getting_started/scalar.png" height="300"/>
D
daminglu 已提交
25 26
</p>

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
### Easy to Integrate

Visual DL provides independent Python SDK. If the training task is based on Python, user can simply
use Visual DL by installing the Visual DL wheel package and importing it into her/his own project.
Please refer to Installation for more details.

### Easy to Use
- Add log collecting logic to your own Python code.

```python
import visualdl

log_writer = LogWriter("./log", sync_cycle=300)
with log_writer.mode('train') as logger:
	loss_writer = logger.scalar("loss")

for step in steps:
	loss = train_process() // Insert your training code here
	loss_writer.add_record(step, loss)
```

- Launch Visual DL service and you can see the visualization results.

```shell
51
visualdl --logdir ./log --port 8080
52
```
D
daminglu 已提交
53

T
Thuan Nguyen 已提交
54
### Comprehensive Usability
D
daminglu 已提交
55 56 57 58 59 60 61 62

1. Scalar: support scalar line/dot data visualization, like the figure above.
    - can show metrics such as loss, accuracy, etc via lines and dots and let user see trends easily
    - can draw several curves in one figure so that it is easy to compare various metrics

2. Image: support image display.
    - display input and intermediate images, easy to check data sample
    - support display for convolutional layer, easy to see results after each layer
63 64 65
        <p align="left">
        <img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/getting_started/dog.png" height="300" width="300"/>
        </p>
D
daminglu 已提交
66
	- support image-generating tasks to preview generated image
67 68 69
        <p align="left">
        <img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/getting_started/image-gan.png" height="300" width="300"/>
        </p>
D
daminglu 已提交
70

T
Thuan Nguyen 已提交
71
3. Histogram: display of parameter distribution, easy to check distribution curves in each tensor,
D
daminglu 已提交
72 73 74
show the trend of parameter distribution.

	- help users understand the training process and the underneath reason for the change from one parameter distribution to another
T
Thuan Nguyen 已提交
75 76
	- help users judge if the training is on the track. For example, if parameter change rate becomes close to 0 or grows rapidly,
	then exploding and vanishing gradients might happen
77 78 79
        <p align="left">
        <img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/getting_started/histogram.png" />
        </p>
D
daminglu 已提交
80 81

4. Graph: visualize the model structure of deep learning networks.
T
Thuan Nguyen 已提交
82
    - Graph supports the preview of [ONNX](http://onnx.ai/) model. Since models of MXNet, Caffe2, PyTorch and CNTK can be converted to ONNX models easily,
D
daminglu 已提交
83 84 85
    Visual DL can also support these models indirectly
    - easy to see wrong configuration of a network
    - help understand network structure
86 87 88
        <p align="left">
        <img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/getting_started/graph.png" height="250" width="400"/>
        </p>
D
daminglu 已提交
89 90

### Purely Open Source
T
Thuan Nguyen 已提交
91
As a deep learning visualization tool, Visual DL support most deep learning frameworks. On the SDK perspective,
D
daminglu 已提交
92 93 94 95
it is easy to integrate into Python and C++ projects. Through ONNX, Visual DL's Graph component can support
many popular frameworks such as PaddlePaddle, MXNet, PyTorch and  Caffe2.

Welcome everyone to comment and contribute to make Visual DL easier to use, with more features.