Skip to main content

Visualize Deep Learning

Project description

[![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)

<p align="center">
<img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/vs-logo.png" width="60%" />
</p>

## 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 provides following components:

- scalar
- histogram
- image
- audio
- graph
- high dimensional

### Scalar
Scalar can be used to show the trends of error during training.

<p align="center">
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/loss_scalar.gif" width="60%"/>
</p>

### Histogram
Histogram can be used to visualize parameter distribution and trends for any tensor.

<p align="center">
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/histogram.gif" width="60%"/>
</p>

### Image
Image can be used to visualize any tensor or intermediate generated image.

<p align="center">
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/loss_image.gif" width="60%"/>
</p>

### Audio
Audio can be used to play input audio samples or generated audio samples.

### 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.

<p align="center">
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/graph_demo.gif" width="60%" />
</p>

### High Dimensional
High Dimensional can be used to visualize data embeddings by projecting high-dimensional data into 2D / 3D.

<p align="center">
<img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/getting_started/high_dimensional_3d.png" width="60%"/>
</p>

## Quick Start
To give the VisualDL a quick test, please use the following commands.

```
# Install the VisualDL. Preferably under a virtual environment or anaconda.
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
```

If you encounter the error `TypeError: __init__() got an unexpected keyword argument 'file'`, that is due to protobuf version is not 3.5+,simply run `pip install --upgrade protobuf` will fix the issue.

If you run into any other issues in above steps, it could be error caused by environmental issues by different python or pip versions.
Following installation methods might fix the issues.

## Install with Virtualenv

[Virtualenv](https://virtualenv.pypa.io/en/stable/) creates isolated Python environment that prevents interfering
by other Python programs on the same machine and make sure Python and pip are located properly.

On macOS, install pip and virtualenv by:
```
sudo easy_install pip
pip install --upgrade virtualenv
```

On Linux, install pip and virtualenv by:
```
sudo apt-get install python3-pip python3-dev python-virtualenv
```

Then create a Virtualenv environment by one of following command:
```
virtualenv ~/vdl # for Python2.7
virtualenv -p python3 ~/vdl for Python 3.x
```

```~/vdl``` will be your Virtualenv directory, you may choose to install anywhere.

Activate your Virtualenv environment by:
```
source ~/vdl/bin/activate
```

Now you should be able to install VisualDL and run our demo:

```
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
```

If you still have issues installing VisualDL from Virtualenv, try following installation method.


## Install with Anaconda

Anaconda is a python distribution, with installation and package management tools. Also it is an environment manager,
which provides the facility to create different python environments, each with their own settings.

Follow the instructions on the [Anaconda download site](https://www.anaconda.com/download) to download and install Anaconda.
Download Python 3.6 version command-Line installer.

Create a conda environment named ```vdl``` or anything you want by:
```
conda create -n vdl pip python=2.7 # or python=3.3, etc.
```

Activate the conda environment by:
```
source activate vdl
```

Now you should be able to install VisualDL and run our demo:

```
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
```

If you still have issues installing VisualDL, try installing from sources as in following section.


### Install from source
```
#Preferably under a virtualenv or anaconda.
git clone https://github.com/PaddlePaddle/VisualDL.git
cd VisualDL

python setup.py bdist_wheel
pip install --upgrade dist/visualdl-*.whl
```

If there are still issues regarding the ```pip install```, you can still start Visual DL by starting the dev server
[here](https://github.com/PaddlePaddle/VisualDL/blob/develop/docs/how_to_dev_frontend_en.md)


## SDK
VisualDL provides both Python SDK and C++ SDK in order to fit more use cases.


### Python SDK
VisualDL now supports both Python 2 and Python 3.
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=10000)

# 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 <cstdlib>
#include <string>
#include "visualdl/logic/sdk.h"

namespace vs = visualdl;
namespace cp = visualdl::components;

int main() {
const std::string dir = "./tmp";
vs::LogWriter logger(dir, 10000);

logger.SetMode("train");
auto tablet = logger.AddTablet("scalars/scalar0");

cp::Scalar<float> scalar0(tablet);

for (int step = 0; step < 1000; step++) {
float v = (float)std::rand() / RAND_MAX;
scalar0.AddRecord(step, v);
}

return 0;
}
```

## Launch Visual DL
After some logs have been generated during training, users can launch Visual DL application to see real-time data visualization by:


```
visualdl --logdir <some log dir>
```

visualDL also supports following optional parameters:

- `--host` set IP
- `--port` set port
- `-m / --model_pb` specify ONNX format for model file to view graph


### Contribute

VisualDL is initially created by [PaddlePaddle](http://www.paddlepaddle.org/) and
[ECharts](http://echarts.baidu.com/).
We welcome everyone to use, comment and contribute to Visual DL :)


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

visualdl-1.2.0-cp36-cp36m-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.6mWindows x86-64

visualdl-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.6m

visualdl-1.2.0-cp36-cp36m-macosx_10_7_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

visualdl-1.2.0-cp35-cp35m-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.5mWindows x86-64

visualdl-1.2.0-cp35-cp35m-manylinux1_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.5m

visualdl-1.2.0-cp34-cp34m-manylinux1_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.4m

visualdl-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl (5.3 MB view details)

Uploaded CPython 2.7mu

visualdl-1.2.0-cp27-cp27m-manylinux1_x86_64.whl (5.3 MB view details)

Uploaded CPython 2.7m

visualdl-1.2.0-cp27-cp27m-macosx_10_6_x86_64.whl (4.4 MB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

Details for the file visualdl-1.2.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 45f60dda42b0c68143913775fd23c27b10e79b647fe10b210b4f89ca86445fb9
MD5 c55fa15171cdc872c28f49094ea5d9e1
BLAKE2b-256 be0a9bafedf2e2139ac7421d102ebb7d6448e1ef1dbb366d142b2fbe01a71a88

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c4f53b9dd29769b8b8c02c719822b0e25fd06a83fb0054abdeebc7f1c937edb9
MD5 b968c1ff91ed685136cb63c7fa635c86
BLAKE2b-256 4b0eecc33ac03fbd0fe2b1dfea6ff7842cb8218b6d4cbe57e94e77930bd5cfde

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 4f5e7c7e277c6ae558496837fc8603e19932d11b5bad5e8e034525b06bf46272
MD5 0e4baedb0b8e9e21c6985991a40851f1
BLAKE2b-256 f0ab9137dc482fae0e30c334db34cf06b1c334794e187d5611fcf0d1406fb726

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 0022376ca32b7cad1087e1630d607467a4c9765fc5474aa53d67eb4269f7e7f2
MD5 e420198f15406347fea17f4ae0448472
BLAKE2b-256 2fbbc0d7f52971c1fd7625d0f9f5d9435cc47ce7acd7424c89f25f1403f9f0be

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0e943087d2b6b47c954bc4b9ef848feb352d28dbbf4cbe5f6a7b093b36378767
MD5 391266eae922b0d88e191893f2101426
BLAKE2b-256 57d03f2f5ee454f173024aaca8795a489381e599424ae3ef6e8694f4daf7d80e

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bed1cb7b848ba9b4d0b3d78203f03c2485f5ff36239f388c39140565165fae77
MD5 70092ce745aec500724c51fdc0603cfb
BLAKE2b-256 7fc1fb3fc9a8b8a0eda6b1215924115dba3128ba0ebe6534ace76fbb5da1f395

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d1f8efe6eb0a6933c5a85ec6d30f06f02f8c8816af823f86ace38c04810b7206
MD5 b58d1e80b39a4506e506163ef7f122ac
BLAKE2b-256 bc0dd97706fef88a9a742fd3c0c9998a55875c8536ddc2d7e9dd17a60a74c4f4

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dd3ebdedf0a21015d72c664463800110e4a399ea4561421d3c838a94e6f4fd48
MD5 49ace181cbf556ab53060915d03aed0b
BLAKE2b-256 ca28a81e12cdb2004ffd37ded1722f3168435f118bdbc7ad42f9b4b1344381e4

See more details on using hashes here.

File details

Details for the file visualdl-1.2.0-cp27-cp27m-macosx_10_6_x86_64.whl.

File metadata

  • Download URL: visualdl-1.2.0-cp27-cp27m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 2.7m, macOS 10.6+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for visualdl-1.2.0-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 2e2840662c926b173ab5d27a729816592f80c4f7335ce139fd590b09de051156
MD5 d9e729406abc01d39523dfac8dfb3f4f
BLAKE2b-256 38128e4b3e88bfbebd575d910f1875aa81f22d368a385e5333f3b0476d6ddf97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page