From 3bcb67f1db1619a7435e6eff618f9e461ff16e86 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Tue, 29 May 2018 14:56:37 +0800 Subject: [PATCH] fix a bug --- python/paddle/fluid/layers/nn.py | 5 +++-- tools/codestyle/docstring_checker.pyc | Bin 0 -> 11769 bytes 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tools/codestyle/docstring_checker.pyc diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index c337e0f4f2..3f04dcccd6 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -3990,15 +3990,16 @@ def upsampling_bilinear2d(input, out_shape=None, scale=None, name=None): return out -def random_crop(input, shape, seed=0): +def random_crop(input, shape, seed=1): helper = LayerHelper("random_crop", **locals()) dtype = helper.input_dtype() out = helper.create_tmp_variable(dtype) if isinstance(seed, int): + seed_value = seed seed = helper.create_global_variable( persistable=True, shape=[1], dtype="int32") helper.set_variable_initializer( - var=seed, initializer=Constant(value=seed)) + var=seed, initializer=Constant(value=seed_value)) elif not isinstance(seed, Variable): raise ValueError("'seed' must be a Variable or an int.") seed_out = helper.create_tmp_variable(dtype="int32") diff --git a/tools/codestyle/docstring_checker.pyc b/tools/codestyle/docstring_checker.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ce612ca2318ccb9b9f28d51cb93ce8e5e1d0680 GIT binary patch literal 11769 zcmdT~Npl;=7488*kbt;or54N9SSu6>B(->BXxWq~%SvoYHISncEfx%6hUAa~3^+Zo zNn5H^N~tWz+>(Egs#N8a$}N>ceDg86+w?9wB4|7 zo0g|EGV6gi=Klvjv!x7%i8N5EO`nkfL%br6Q-8M3Sz+ zt_L-(?WHhqwH+^ccB>YVI;Ul&m$Ad>EYaPfYpqgXO>iI zxeCX~^PVl`kUCj5W-h>a;=n;1LQ3_(t3~FFSgXBY;c1*uwdyx<#MNV*lM^dz#7eiw z#a>~}G?K**nSwH>x`j+{A=_KXsVQIjROK)$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