(self, x)
| 120 | ) |
| 121 | |
| 122 | def forward(self, x): |
| 123 | identity = x |
| 124 | |
| 125 | if self.use_expansion: |
| 126 | x = self.expand_conv(x) |
| 127 | |
| 128 | x = self.depthwise_conv(x) |
| 129 | |
| 130 | se_weight = self.se(x) |
| 131 | x = x * se_weight |
| 132 | |
| 133 | x = self.project_conv(x) |
| 134 | |
| 135 | if self.use_residual: |
| 136 | x = x + identity |
| 137 | |
| 138 | return x |
| 139 | |
| 140 | class UNetBlock(nn.Module): |
| 141 | def __init__(self, in_channels, out_channels, down=True): |
nothing calls this directly
no outgoing calls
no test coverage detected