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: doc/design/var_desc.md
+29-17Lines changed: 29 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
## Background
2
2
PaddlePaddle divides the description of neural network computation into two stages: compile time and runtime. At compile time, the neural network computation is described as a `ProgramDesc` whereas at runtime an `Executor` interprets the `ProgramDesc` to compute the operations.
3
3
4
-
PaddlePaddle use proto message to describe compile time program because
4
+
PaddlePaddle uses proto message to describe compile time program because :
5
5
6
6
1. The computation program description must be serializable and saved in a file.
7
-
1. During distributed training, the sreialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on different workers.
7
+
1. During distributed training, the serialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on a different worker.
8
8
9
9
The computation `Program` consists of nested `Blocks`. Each `Block` will consist of data(i.e. `Variable`) and `Operations`. The concept to represent them is in the table below.
10
10
@@ -14,40 +14,52 @@ The computation `Program` consists of nested `Blocks`. Each `Block` will consist
14
14
|Operation|OpDesc(proto)|Operator(cpp)|
15
15
16
16
17
-
## Definition of VarDesc
17
+
## Definition of VarType
18
18
19
-
A VarDesc should have a name, and value. The are two kinds of variable type in compile time, they are `LoDTensor`and `SelectedRows`.
19
+
A VarDesc should have a name, type and whether or not it is persistable. The are different kinds of variable types supported in PaddlePaddle, apart from the POD_Types like: `LOD_TENSOR`, `SELECTED_ROWS`, `FEED_MINIBATCH`, `FETCH_LIST`, `STEP_SCOPES`, `LOD_RANK_TABLE`, `LOD_TENSOR_ARRAY`, `PLACE_LIST`, `READER`and `CHANNEL`. These are declared inside `VarType`. A `VarDesc` then looks as the following:
0 commit comments