Commit f48159a
authored
Optimizer use init program (#5275)
* optimizer use init_program
* create persistable variable
* add create_persistable_var to block
* optimizer use create_persistable_var
* fix prefix
* move create_global_persistable_var from Block to LayerHelper
* Polish Optimizer initialization code.
* Using the LayerHelper to create initialize operator and variables
* add_accumulator should use an independent data type
* default use param data type for accumulator1 parent 90f4d5e commit f48159a
File tree
10 files changed
+213
-158
lines changed- python/paddle/v2/framework
- tests
10 files changed
+213
-158
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | | - | |
| 5 | + | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 10 | | |
18 | 11 | | |
19 | 12 | | |
| |||
138 | 131 | | |
139 | 132 | | |
140 | 133 | | |
141 | | - | |
| 134 | + | |
142 | 135 | | |
143 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
0 commit comments