(self, x)
| 249 | self.beta = nn.Parameter(torch.zeros(1, 1, 1, dim)) |
| 250 | |
| 251 | def forward(self, x): |
| 252 | gx = torch.norm(x, p=2, dim=(1, 2), keepdim=True) |
| 253 | nx = gx / (gx.mean(dim=-1, keepdim=True) + 1e-6) |
| 254 | return self.gamma * (x * nx) + self.beta + x |
nothing calls this directly
no outgoing calls
no test coverage detected