From 9eb19df26649f26a611354965b2d28bae9b11815 Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Mon, 20 May 2019 06:46:30 -0500 Subject: [PATCH] fix uniform_random op,test=develop (#17492) --- python/paddle/fluid/layers/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/ops.py b/python/paddle/fluid/layers/ops.py index 636e83996f..87a4e32748 100644 --- a/python/paddle/fluid/layers/ops.py +++ b/python/paddle/fluid/layers/ops.py @@ -86,9 +86,9 @@ def uniform_random(shape, dtype='float32', min=-1.0, max=1.0, seed=0): result = fluid.layers.uniform_random(shape=[32, 784]) """ - locals_var = locals() if not isinstance(dtype, core.VarDesc.VarType): dtype = convert_np_dtype_to_dtype_(dtype) + locals_var = locals() kwargs = dict() for name, val in locals_var.items(): if val is not None: -- GitLab