From 3834ee10c685d9f2f23b0d102709eff466832531 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Fri, 30 Apr 2021 10:53:05 +0800 Subject: [PATCH] fix srn for sublayer --- ppocr/modeling/heads/self_attention.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppocr/modeling/heads/self_attention.py b/ppocr/modeling/heads/self_attention.py index 51d5198f..4e96e4a4 100644 --- a/ppocr/modeling/heads/self_attention.py +++ b/ppocr/modeling/heads/self_attention.py @@ -285,8 +285,7 @@ class PrePostProcessLayer(nn.Layer): elif cmd == "n": # add layer normalization self.functors.append( self.add_sublayer( - "layer_norm_%d" % len( - self.sublayers(include_sublayers=False)), + "layer_norm_%d" % len(self.sublayers()), paddle.nn.LayerNorm( normalized_shape=d_model, weight_attr=fluid.ParamAttr( -- GitLab