mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
fix (#541)
* Update res2net.py * Update res2net_vd.py * Update resnest.py * Update distillation_models.py
This commit is contained in:
parent
aba9738284
commit
d3691054ed
@ -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
|
||||
return teacher_label, student_label
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user