From 4aeb9a48b4b4c6eb10f8395a9bdf0d6fec5d67d6 Mon Sep 17 00:00:00 2001 From: cuicheng01 <45199522+cuicheng01@users.noreply.github.com> Date: Wed, 6 Jan 2021 21:45:40 +0800 Subject: [PATCH] fix some bugs (#542) * Update res2net.py * Update res2net_vd.py * Update resnest.py * Update distillation_models.py --- ppcls/modeling/architectures/distillation_models.py | 4 ++-- ppcls/modeling/architectures/res2net.py | 5 ----- ppcls/modeling/architectures/res2net_vd.py | 5 ----- ppcls/modeling/architectures/resnest.py | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/ppcls/modeling/architectures/distillation_models.py b/ppcls/modeling/architectures/distillation_models.py index 5ef3b32c..55d165dc 100644 --- a/ppcls/modeling/architectures/distillation_models.py +++ b/ppcls/modeling/architectures/distillation_models.py @@ -50,7 +50,7 @@ class ResNet50_vd_distill_MobileNetV3_large_x1_0(nn.Layer): class ResNeXt101_32x16d_wsl_distill_ResNet50_vd(nn.Layer): def __init__(self, class_dim=1000, **args): - super(ResNet50_vd_distill_MobileNetV3_large_x1_0, self).__init__() + super(ResNeXt101_32x16d_wsl_distill_ResNet50_vd, self).__init__() self.teacher = ResNeXt101_32x16d_wsl(class_dim=class_dim, **args) @@ -62,4 +62,4 @@ class ResNeXt101_32x16d_wsl_distill_ResNet50_vd(nn.Layer): student_label = self.student(input) - return teacher_label, student_label \ No newline at end of file + return teacher_label, student_label diff --git a/ppcls/modeling/architectures/res2net.py b/ppcls/modeling/architectures/res2net.py index 1949262a..4980e34a 100644 --- a/ppcls/modeling/architectures/res2net.py +++ b/ppcls/modeling/architectures/res2net.py @@ -247,11 +247,6 @@ def Res2Net50_14w_8s(**args): return model -def Res2Net50_48w_2s(**args): - model = Res2Net(layers=50, scales=2, width=48, **args) - return model - - def Res2Net50_26w_6s(**args): model = Res2Net(layers=50, scales=6, width=26, **args) return model diff --git a/ppcls/modeling/architectures/res2net_vd.py b/ppcls/modeling/architectures/res2net_vd.py index e4ffb773..9961d520 100644 --- a/ppcls/modeling/architectures/res2net_vd.py +++ b/ppcls/modeling/architectures/res2net_vd.py @@ -270,11 +270,6 @@ def Res2Net50_vd_14w_8s(**args): return model -def Res2Net50_vd_48w_2s(**args): - model = Res2Net_vd(layers=50, scales=2, width=48, **args) - return model - - def Res2Net50_vd_26w_6s(**args): model = Res2Net_vd(layers=50, scales=6, width=26, **args) return model diff --git a/ppcls/modeling/architectures/resnest.py b/ppcls/modeling/architectures/resnest.py index 0875c06a..4eeefddf 100644 --- a/ppcls/modeling/architectures/resnest.py +++ b/ppcls/modeling/architectures/resnest.py @@ -242,7 +242,7 @@ class BottleneckBlock(nn.Layer): num_filters=group_width, filter_size=3, stride=1, - dilation=dialtion, + dilation=dilation, groups=cardinality, act="relu", name=name + "_conv2") -- GitLab