Skip to content

Commit ffccaa6

Browse files
committed
enable_static in sample code
1 parent 7e72e04 commit ffccaa6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/paddle/fluid/optimizer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6856,8 +6856,11 @@ class RecomputeOptimizer(Optimizer):
68566856
Examples:
68576857
.. code-block:: python
68586858
6859+
import paddle
68596860
import paddle.fluid as fluid
68606861
import numpy as np
6862+
6863+
paddle.enable_static()
68616864
def gen_data():
68626865
return {"x": np.random.random(size=(32, 32)).astype('float32'),
68636866
"y": np.random.randint(2, size=(32, 1)).astype('int64')}

0 commit comments

Comments
 (0)