未验证 提交 a601714e 编写于 作者: T Thuan Nguyen 提交者: GitHub

Travis doc build (#232)

* Add travis-ci job to deploy docs to visualdl.paddlepaddle.org.  Update readme's to correctly show all images.

* Add SSH known hosts

* Add in additional restrictions for documentation deploy:
* Only deploy on merge to 'develop' branch
上级 376de50a
......@@ -16,6 +16,7 @@ os:
env:
- JOB=check_style
- JOB=test
- JOB=build_doc
addons:
apt:
......@@ -31,6 +32,7 @@ addons:
- ccache
- npm
- nodejs
ssh_known_hosts: 52.76.173.135
before_install:
- if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; sudo pip install pre-commit flake8; fi
......@@ -41,6 +43,14 @@ before_install:
script:
- if [[ "$JOB" == "check_style" ]]; then ./travis/check_style.sh; fi
- if [[ "$JOB" == "test" ]]; then /bin/bash ./tests.sh all; fi
- |
if [[ "$JOB" != "build_doc" ]]; then exit 0; fi;
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
if [[ "$TRAVIS_BRANCH" != "develop" ]]; then exit 0; fi;
export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
export DOCS_DIR=`pwd`
cd ..
curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR
notifications:
email:
......
......@@ -4,9 +4,10 @@
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
<p align="center">
<img src="./docs/images/vs-logo.png" width="60%" />
<img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/vs-logo.png" width="60%" />
</p>
#
## 介绍
VisualDL是一个面向深度学习任务设计的可视化工具,包含了scalar、参数分布、模型结构、图像可视化等功能,项目正处于高速迭代中,新的组件会不断加入。
......@@ -28,21 +29,21 @@ VisualDL 目前支持4种组件:
兼容 ONNX(Open Neural Network Exchange)[https://github.com/onnx/onnx], 通过与 python SDK的结合,VisualDL可以兼容包括 PaddlePaddle, pytorch, mxnet在内的大部分主流DNN平台。
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/graph_demo.gif" width="60%" />
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/graph_demo.gif" width="60%" />
</p>
### scalar
可以用于展示训练测试的误差趋势
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/loss_scalar.gif" width="60%"/>
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/loss_scalar.gif" width="60%"/>
</p>
### image
可以用于可视化任何tensor,或模型生成的图片
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/loss_image.gif" width="60%"/>
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/loss_image.gif" width="60%"/>
</p>
### histogram
......@@ -50,7 +51,7 @@ VisualDL 目前支持4种组件:
用于可视化任何tensor中元素分布的变化趋势
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/histogram.gif" width="60%"/>
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/histogram.gif" width="60%"/>
</p>
## 快速尝试
......
......@@ -4,9 +4,10 @@
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
<p align="center">
<img src="./docs/images/vs-logo.png" width="60%" />
<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.
......@@ -35,7 +36,7 @@ Cooperated with Python SDK, VisualDL can be compatible with most major DNN frame
PaddlePaddle, PyTorch and MXNet.
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/graph_demo.gif" width="60%" />
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/graph_demo.gif" width="60%" />
</p>
### Scalar
......@@ -43,21 +44,21 @@ Scalar can be used to show the trends of error during training.
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/loss_scalar.gif" width="60%"/>
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/loss_scalar.gif" width="60%"/>
</p>
### Image
Image can be used to visualize any tensor or intermediate generated image.
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/loss_image.gif" width="60%"/>
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/loss_image.gif" width="60%"/>
</p>
### Histogram
Histogram can be used to visualize parameter distribution and trends for any tensor.
<p align="center">
<img src="https://github.com/daming-lu/large_files/blob/master/histogram.gif" width="60%"/>
<img src="https://raw.githubusercontent.com/daming-lu/large_files/master/histogram.gif" width="60%"/>
</p>
## Quick Start
......
../README.cn.md
\ No newline at end of file
# VisualDL (Visualize the Deep Learning)
## Introduction
VisualDL is a visualization tool for deep learning, including scalar, parameter distribution, model structure, image visualization and other features.
The project is under development, and will provide more features.
Most of the DNN platforms are using Python. VisualDL supports Python out of the box.
By just adding a few lines of configuration to the code, VisualDL can provide a rich visual support for the training process.
In addition to Python SDK, the underlying VisualDL is written in C++, and its exposed C++ SDK can be integrated into other platforms.
Users can access the original features and monitor customized matrix.
## Components
VisualDL supports four componments:
- graph
- scalar
- image
- histogram
### graph
Compatible with ONNX (Open Neural Network Exchange) [https://github.com/onnx/onnx]. VisualDL is compatible with the mainstream DNN platforms such as PaddlePaddle, Pytorch, and MXNet through Python SDK.
<p align="center">
<img src="./introduction/graph.png" width="60%"/>
</p>
### scalar
Show the error trend throughout the training.
<p align="center">
<img src="./introduction/scalar.png" width="60%"/>
</p>
### image
To visualize any tensor, or model generated images
<p align="center">
<img src="./introduction/image-gan.png" width="60%"/>
</p>
### histogram
To visualize the distribution of elements in any tensor
<p align="center">
<img src="./introduction/histogram.png" width="60%"/>
</p>
## SDK
VisualDL also provides Python SDK and C++ SDK for different platforms.
### Python SDK
Take the simplest Scalar component, for example, to try to create a scalar component and log the data:
```python
import random
from visualdl import LogWriter
logdir = "./tmp"
logger = LogWriter(dir, 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, lets start from another block.
with logger.mode("train"):
# add scalars
for step in range(100):
scalar0.add_record(step, random.random())
```
### C++ SDK
The same code for C++ SDK in the above Python SDK is as follows
```c++
#include <cstdlib>
#include <string>
#include "visualdl/sdk.h"
namespace vs = visualdl;
namespace cp = visualdl::components;
int main() {
const std::string dir = "./tmp";
vs::LogWriter logger(dir, 10);
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;
}
```
## Activate Board
When the log data has been generated during the training process, the board can be started for real-time data visualization.
```
visualDL --logdir <some log dir>
```
the Board supports configuration of remote access.
- `--host` Configure IP
- `--port` Configure port
../README.md
\ No newline at end of file
......@@ -4,6 +4,7 @@ VisualDL
.. toctree::
:maxdepth: 1
首页<README.cn.md>
quick_start_cn.md
contribute_code_cn.md
api/visualdl.rst
\ No newline at end of file
......@@ -57,7 +57,7 @@ visualDL --logdir ./random_log --port 8080
之后用浏览器打开地址 `http://0.0.0.0:8080`,就可以看到scalar下的可视化结果
<p align="center">
<img src="./images/scratch_scalar.png"/>
<img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/scratch_scalar.png"/>
</p>
## scalar的C++ 示例
......@@ -86,4 +86,6 @@ visualDL --logdir somedir --model_pb <path_to_model>
比如mnist,会得到如下graph
IMG
<p align=center>
<img width="70%" src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/demo/mxnet/mxnet_graph.gif" />
</p>
......@@ -64,7 +64,7 @@ visualDL --logdir ./random_log --port 8080
Point your browser to `http://0.0.0.0:8080`, you can see the scalar as follows:
<p align="center">
<img src="./images/scratch_scalar.png"/>
<img src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/scratch_scalar.png"/>
</p>
## Scalar Demo in C++
......@@ -95,5 +95,5 @@ visualDL --logdir somedir --model_pb <path_to_model>
For example, for the MNIST dataset, Graph component can render model graph as below:
<p align=center>
<img width="70%" src="https://github.com/PaddlePaddle/VisualDL/blob/develop/demo/mxnet/mxnet_graph.gif" />
<img width="70%" src="https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/demo/mxnet/mxnet_graph.gif" />
</p>
......@@ -4,4 +4,5 @@ scipy==1.0.0
Sphinx==1.6.6
sphinx-rtd-theme==0.2.4
flake8==3.5.0
Pillow==5.0.0
pre-commit==1.5.1
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册