Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions python/paddle/fluid/layers/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def uniform_random(shape, dtype='float32', min=-1.0, max=1.0, seed=0):

if not isinstance(dtype, core.VarDesc.VarType):
dtype = convert_np_dtype_to_dtype_(dtype)
locals_var = locals()
locals_var = locals().copy()
kwargs = dict()
for name, val in locals_var.items():
if val is not None:
Expand All @@ -103,7 +103,7 @@ def uniform_random(shape, dtype='float32', min=-1.0, max=1.0, seed=0):


def hard_shrink(x, threshold=None):
locals_var = locals()
locals_var = locals().copy()
kwargs = dict()
for name, val in locals_var.items():
if val is not None:
Expand All @@ -124,7 +124,7 @@ def hard_shrink(x, threshold=None):


def cumsum(x, axis=None, exclusive=None, reverse=None):
locals_var = locals()
locals_var = locals().copy()
kwargs = dict()
for name, val in locals_var.items():
if val is not None:
Expand All @@ -145,7 +145,7 @@ def cumsum(x, axis=None, exclusive=None, reverse=None):


def thresholded_relu(x, threshold=None):
locals_var = locals()
locals_var = locals().copy()
kwargs = dict()
for name, val in locals_var.items():
if val is not None:
Expand Down