Update swiftformer.py
This commit is contained in:
committed by
GitHub
parent
ef5daec20c
commit
37a4fe953d
@@ -209,7 +209,6 @@ class SwiftFormerLocalRepresentation(nn.Module):
|
|||||||
nn.init.constant_(m.bias, 0)
|
nn.init.constant_(m.bias, 0)
|
||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
print("SwiftFormerLocalRepresentation input is ", x.shape)
|
|
||||||
input = x
|
input = x
|
||||||
x = self.dwconv(x)
|
x = self.dwconv(x)
|
||||||
x = self.norm(x)
|
x = self.norm(x)
|
||||||
@@ -220,7 +219,6 @@ class SwiftFormerLocalRepresentation(nn.Module):
|
|||||||
x = input + self.drop_path(self.layer_scale * x)
|
x = input + self.drop_path(self.layer_scale * x)
|
||||||
else:
|
else:
|
||||||
x = input + self.drop_path(x)
|
x = input + self.drop_path(x)
|
||||||
|
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user