(self, x)
| 9 | self.power = power |
| 10 | |
| 11 | def forward(self, x): |
| 12 | norm = x.pow(self.power).sum(1, keepdim=True).pow(1. / self.power) |
| 13 | out = x.div(norm) |
| 14 | return out |
| 15 | |
| 16 | class Non_local(nn.Module): |
| 17 | def __init__(self, in_channels, reduc_ratio=2): |
nothing calls this directly
no outgoing calls
no test coverage detected