diff --git a/python/paddle/nn/functional/norm.py b/python/paddle/nn/functional/norm.py index a5de268ec2314a6e7ff8014c9ce1bb8efa598b2b..c039754af4d12354a7cdd96c5c135af5ad993845 100644 --- a/python/paddle/nn/functional/norm.py +++ b/python/paddle/nn/functional/norm.py @@ -489,7 +489,7 @@ def local_response_norm(x, format(dim)) for i, sz in enumerate(sizes): - if not sz > 0: + if not sz > 0 and i > 0: raise ValueError("Expected every dim's size to be larger than 0, " "but the size of the {}-th dim is {}".format(i, sz))