x: point features of shape [B, N_feat, 3, N_samples, ...]
(self, x)
| 151 | self.bn = nn.BatchNorm2d(num_features) |
| 152 | |
| 153 | def forward(self, x): |
| 154 | ''' |
| 155 | x: point features of shape [B, N_feat, 3, N_samples, ...] |
| 156 | ''' |
| 157 | # norm = torch.sqrt((x*x).sum(2)) |
| 158 | norm = torch.norm(x, dim=2) + EPS |
| 159 | norm_bn = self.bn(norm) |
| 160 | norm = norm.unsqueeze(2) |
| 161 | norm_bn = norm_bn.unsqueeze(2) |
| 162 | x = x / norm * norm_bn |
| 163 | |
| 164 | return x |
| 165 | |
| 166 | |
| 167 | class VNMaxPool(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected