| 75 | |
| 76 | |
| 77 | class MSoftplus(nn.Module): |
| 78 | def __init__(self): |
| 79 | super().__init__() |
| 80 | self.softplus = nn.Softplus() |
| 81 | self.cst = torch.log(torch.tensor(2.)) |
| 82 | |
| 83 | def forward(self, input): |
| 84 | return self.softplus(input)-self.cst |
| 85 | |
| 86 | |
| 87 | class Swish(nn.Module): |