| 10 | |
| 11 | |
| 12 | class MLPDecoder(nn.Module): |
| 13 | def __init__(self, feat_dim, num_points): |
| 14 | super().__init__() |
| 15 | self.np = num_points |
| 16 | self.fc_layers = nn.Sequential( |
| 17 | nn.Linear(feat_dim * 2, num_points * 2), |
| 18 | nn.BatchNorm1d(num_points * 2), |
| 19 | nn.LeakyReLU(0.2), |
| 20 | nn.Linear(num_points * 2, num_points * 3), |
| 21 | ) |
| 22 | |
| 23 | def forward(self, x): |
| 24 | # x.shape: (bs,1024) |
| 25 | batch_size = x.shape[0] |
| 26 | f = self.fc_layers(x) |
| 27 | return f.reshape(batch_size, self.np, 3) |
no outgoing calls
no test coverage detected