| 197 | |
| 198 | class PointNetSetAbstraction(nn.Module): |
| 199 | def __init__(self, npoint, radius, nsample, in_channel, mlp, group_all): |
| 200 | super(PointNetSetAbstraction, self).__init__() |
| 201 | self.npoint = npoint |
| 202 | self.radius = radius |
| 203 | self.nsample = nsample |
| 204 | self.mlp_convs = nn.ModuleList() |
| 205 | self.mlp_bns = nn.ModuleList() |
| 206 | last_channel = in_channel |
| 207 | for out_channel in mlp: |
| 208 | self.mlp_convs.append(nn.Conv2d(last_channel, out_channel, 1)) |
| 209 | self.mlp_bns.append(nn.BatchNorm2d(out_channel)) |
| 210 | last_channel = out_channel |
| 211 | self.group_all = group_all |
| 212 | |
| 213 | def forward(self, xyz, points): |
| 214 | """ |