From bea725bb90104b8b0b322544986c12a1d87443a9 Mon Sep 17 00:00:00 2001 From: huangjun12 <12272008@bjtu.edu.cn> Date: Fri, 18 Mar 2022 12:59:30 +0000 Subject: [PATCH] fix lrn bug in export model --- python/paddle/nn/functional/norm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/nn/functional/norm.py b/python/paddle/nn/functional/norm.py index a5de268ec23..c039754af4d 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)) -- GitLab