(self, x)
| 47 | ) |
| 48 | |
| 49 | def forward(self, x): |
| 50 | x = x.view(-1, self.channels, self.size * self.size).swapaxes(1, 2) |
| 51 | x_ln = self.ln(x) |
| 52 | attention_value, _ = self.mha(x_ln, x_ln, x_ln) |
| 53 | attention_value = attention_value + x |
| 54 | attention_value = self.ff_self(attention_value) + attention_value |
| 55 | return attention_value.swapaxes(2, 1).view(-1, self.channels, self.size, self.size) |
| 56 | |
| 57 | |
| 58 | class DoubleConv(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected