mirror of https://github.com/ZHKKKe/MODNet.git
undo more whitespace changes
parent
f95e1236bc
commit
089a830eea
|
|
@ -56,7 +56,7 @@ class Conv2dIBNormRelu(nn.Module):
|
||||||
|
|
||||||
|
|
||||||
class SEBlock(nn.Module):
|
class SEBlock(nn.Module):
|
||||||
""" SE Block Proposed in https://arxiv.org/pdf/1709.01507.pdf
|
""" SE Block Proposed in https://arxiv.org/pdf/1709.01507.pdf
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, in_channels, out_channels, reduction=1):
|
def __init__(self, in_channels, out_channels, reduction=1):
|
||||||
|
|
@ -68,7 +68,7 @@ class SEBlock(nn.Module):
|
||||||
nn.Linear(int(in_channels // reduction), out_channels, bias=False),
|
nn.Linear(int(in_channels // reduction), out_channels, bias=False),
|
||||||
nn.Sigmoid()
|
nn.Sigmoid()
|
||||||
)
|
)
|
||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
b, c, _, _ = x.size()
|
b, c, _, _ = x.size()
|
||||||
w = self.pool(x).view(b, c)
|
w = self.pool(x).view(b, c)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue