diff --git a/python/paddle/nn/functional/norm.py b/python/paddle/nn/functional/norm.py index c61fafdcb91549177e23520c91469878d0a71371..286f8ef167b457d3e24a8f068e08529ba2f82667 100644 --- a/python/paddle/nn/functional/norm.py +++ b/python/paddle/nn/functional/norm.py @@ -487,11 +487,11 @@ def local_response_norm(x, 'Expected 3D or higher dimensionality input, but got {} dimensions'. format(dim)) - for i, size in enumerate(sizes): - if not size > 0: + for i, sz in enumerate(sizes): + if not sz > 0: raise ValueError("Expected every dim's size to be larger than 0, " "but the size of the {}-th dim is {}".format(i, - size)) + sz)) channel_last = True if data_format[-1] == "C" else False