File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,9 @@ def randint(low,
88
88
89
89
Examples:
90
90
.. code-block:: python
91
+
91
92
import paddle
92
- import paddle.tensor as tensor
93
+ import paddle.fluid as fluid
93
94
94
95
# example 1:
95
96
# attr shape is a list which doesn't contain tensor Variable.
@@ -104,7 +105,7 @@ def randint(low,
104
105
# example 3:
105
106
# attr shape is a Variable, the data type must be int64 or int32.
106
107
var_shape = fluid.data(name='var_shape', shape=[2], dtype="int64")
107
- result_3 = padddle .randint(low=-5, high=5, shape=var_shape, dtype="int32")
108
+ result_3 = paddle .randint(low=-5, high=5, shape=var_shape, dtype="int32")
108
109
var_shape_int32 = fluid.data(name='var_shape_int32', shape=[2], dtype="int32")
109
110
result_4 = paddle.randint(low=-5, high=5, shape=var_shape_int32, dtype="int64")
110
111
You can’t perform that action at this time.
0 commit comments