(self, c, r=16)
| 54 | |
| 55 | class SE_Block(nn.Module): |
| 56 | def __init__(self, c, r=16): |
| 57 | super().__init__() |
| 58 | self.squeeze = GAP() |
| 59 | self.excitation = nn.Sequential( |
| 60 | nn.Linear(c, c // r, bias=False), |
| 61 | nn.ReLU(inplace=True), |
| 62 | nn.Linear(c // r, c, bias=False), |
| 63 | nn.Sigmoid() |
| 64 | ) |
| 65 | |
| 66 | def forward(self, x): |
| 67 | b, c, f = x.shape |