提交 217b0409 编写于 作者: L LDOUBLEV

fix det

上级 5492c10a
......@@ -32,12 +32,12 @@ NetWorks:
model_name: large
disable_se: true
Neck:
name: FEPAN
name: CAPAN
out_channels: 96
shortcut: True
Head:
name: DBHead
k: 50
kernel_size: [7, 2, 2]
Student2:
model_type: det
algorithm: DB
......@@ -48,12 +48,12 @@ NetWorks:
model_name: large
disable_se: true
Neck:
name: FEPAN
name: CAPAN
out_channels: 96
shortcut: True
Head:
name: DBHead
k: 50
kernel_size: [7, 2, 2]
Teacher:
pretrained: ./inference/ch_ppocr_resnet50/student
model_type: det
......@@ -63,12 +63,11 @@ NetWorks:
in_channels: 3
layers: 50
Neck:
name: DBFPN
name: FEPAN
out_channels: 256
big_kernel: true
Head:
name: DBHead
big_kernel: true
kernel_list: [7,2,2]
k: 50
Loss:
......
......@@ -28,12 +28,12 @@ Architecture:
model_name: large
disable_se: True
Neck:
name: FEPAN
name: CAPAN
out_channels: 96
shortcut: True
Head:
name: DBHead
k: 50
kernel_size: [7, 2, 2]
Loss:
name: DBLoss
......
......@@ -21,6 +21,8 @@ from paddle import nn
import paddle.nn.functional as F
from paddle import ParamAttr
import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(__dir__)
sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../../..')))
......@@ -138,11 +140,11 @@ class CALayer(nn.Layer):
class CAFPN(nn.Layer):
def __init__(self, in_channels, out_channels, shortcut, **kwargs):
def __init__(self, in_channels, out_channels, shortcut=True, **kwargs):
super(CAFPN, self).__init__()
self.ins_convs = []
self.inp_convs = []
self.out_channels = out_channels
self.ins_conv = []
self.inp_conv = []
for i in range(len(in_channels)):
self.ins_conv.append(
......@@ -192,8 +194,8 @@ class FEPAN(nn.Layer):
self.out_channels = out_channels
weight_attr = paddle.nn.initializer.KaimingUniform()
self.ins_convs = []
self.inp_convs = []
self.ins_conv = []
self.inp_conv = []
# pan head
self.pan_head_conv = []
self.pan_lat_conv = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册