You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -315,10 +315,18 @@ Developers can compare multiple experiments by specifying and uploading the path
315
315
316
316
### Graph
317
317
318
-
**Graph** enables developers to visualize model structures by only one click. Moreover, **Graph** allows developers to explore model attributes, node information, node input and output. aiding them analyze model structures quickly and understand the direction of data flow easily.
318
+
**Graph** enables developers to visualize model structures by only one click. Moreover, **Graph** allows developers to explore model attributes, node information, node input and output. aiding them analyze model structures quickly and understand the direction of data flow easily. Additionally, Graph supports the visualization of dynamic and static model graph respectively.
Copy file name to clipboardExpand all lines: docs/README.md
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -239,12 +239,21 @@ Developers can compare with multiple experiments by specifying and uploading the
239
239
240
240
### Graph
241
241
242
-
**Graph** enables developers to visualize model structures by only one click. Moreover, **Graph** allows Developers to explore model attributes, node information, node input and output. aiding them analyze model structure quickly and understand the direction of data flow easily.
242
+
**Graph** enables developers to visualize model structures by only one click. Moreover, **Graph** allows developers to explore model attributes, node information, node input and output. aiding them analyze model structures quickly and understand the direction of data flow easily. Additionally, Graph supports the visualization of dynamic and static model graph respectively.
**Histogram** displays how the trend of tensors (weight, bias, gradient, etc.) changes during the training process in the form of histogram. Developers can adjust the model structures accurately by having an in-depth understanding of the effect of each layer.
@@ -454,44 +454,114 @@ Then, open the browser and enter the address`http://127.0.0.1:8080` to view:
454
454
455
455
Graph can visualize the network structure of the model by one click. It enables developers to view the model attributes, node information, searching node and so on. These functions help developers analyze model structures and understand the directions of data flow quickly.
456
456
457
+
### Record Interface
458
+
459
+
The interface of the Graph is shown as follows:
460
+
461
+
```python
462
+
add_graph(model, input_spec, verbose=False):
463
+
```
464
+
465
+
The interface parameters are described as follows:
| model | paddle.nn.Layer | Dynamic model of paddle |
470
+
| input_spec | list\[paddle.static.InputSpec\|Tensor\]| Describes the input of the saved model's [forward arguments](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/static/InputSpec_cn.html)|
471
+
| verbose | bool | Whether to print graph statistic information in console. |
472
+
473
+
**Note**
474
+
475
+
If you want to use add_graph interface, paddle package is required. Please refer to website of [PaddlePaddle](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/en/install/pip/linux-pip_en.html)。
476
+
457
477
### Demo
478
+
The following shows an example of how to use Graph component, and script can be found in [Graph Demo](https://github.com/PaddlePaddle/VisualDL/blob/develop/demo/components/graph_test.py)
458
479
There are two methods to launch this component:
459
480
460
-
- By the front end:
481
+
```python
482
+
import paddle
483
+
import paddle.nn as nn
484
+
import paddle.nn.functional as F
461
485
462
-
- If developers only need to use Graph, developers can launch VisualDL (Graph) by executing `visualdl`on the command line.
463
-
- If developers need to use Graph and other functions at the same time, they need to specify the log file path (using `./log` as an example):
We provide option --model to specify model structure file in previous versions, and this option is still supported now. You can specify model exported by `add_graph` interface ("vdlgraph" contained in filename), which will be shown in dynamic graph page, and we use string "manual_input_model" in the page to denote the model you specify by this option. Other supported file formats are presented in static graph page.
Graph page is divided into dynamic and static version currently. Dynamic version is used to visualize dynamic model of paddle, which is exported by add_graph interface.
555
+
The other is used to visualize static model of paddle, which is exported by [paddle.jit.save](https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/jit/save_en.html) interface and other supported formats.
0 commit comments