From a5fbd902fe6a9bd17d8ed648c31d006f7787bea4 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Thu, 24 Sep 2020 15:11:31 +0800 Subject: [PATCH 1/2] fix srn fpn --- ppocr/modeling/backbones/rec_resnet_fpn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppocr/modeling/backbones/rec_resnet_fpn.py b/ppocr/modeling/backbones/rec_resnet_fpn.py index 0a05b5de..066cba49 100755 --- a/ppocr/modeling/backbones/rec_resnet_fpn.py +++ b/ppocr/modeling/backbones/rec_resnet_fpn.py @@ -100,11 +100,11 @@ class ResNet(): conv = self.basic_block( input=conv, num_filters=num_filters[block], - stride=stride, - if_first=block == i == 0, + stride=stride_list[block] if i == 0 else 1, + is_first=block == i == 0, name=conv_name) F.append(conv) - + print("F:", F) base = F[-1] for i in [-2, -3]: b, c, w, h = F[i].shape From 5f8c3e07d9f39b2b23c91dda3c5a43581fc3a0f6 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Thu, 24 Sep 2020 15:13:29 +0800 Subject: [PATCH 2/2] fix srn fpn --- ppocr/modeling/backbones/rec_resnet_fpn.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ppocr/modeling/backbones/rec_resnet_fpn.py b/ppocr/modeling/backbones/rec_resnet_fpn.py index 066cba49..fb887ce1 100755 --- a/ppocr/modeling/backbones/rec_resnet_fpn.py +++ b/ppocr/modeling/backbones/rec_resnet_fpn.py @@ -104,7 +104,6 @@ class ResNet(): is_first=block == i == 0, name=conv_name) F.append(conv) - print("F:", F) base = F[-1] for i in [-2, -3]: b, c, w, h = F[i].shape