MCPcopy Create free account
hub / github.com/VAST-AI-Research/TriplaneGaussian / forward

Method forward

tgs/models/snowflake/utils.py:195–213  ·  view source on GitHub ↗

Args: xyz: Tensor, (B, 3, N) points: Tensor, (B, f, N) Returns: new_xyz: Tensor, (B, 3, npoint) new_points: Tensor, (B, mlp[-1], npoint)

(self, xyz, points)

Source from the content-addressed store, hash-verified

193 self.mlp_conv = nn.Sequential(*self.mlp_conv)
194
195 def forward(self, xyz, points):
196 """
197 Args:
198 xyz: Tensor, (B, 3, N)
199 points: Tensor, (B, f, N)
200
201 Returns:
202 new_xyz: Tensor, (B, 3, npoint)
203 new_points: Tensor, (B, mlp[-1], npoint)
204 """
205 if self.group_all:
206 new_xyz, new_points, idx, grouped_xyz = sample_and_group_all(xyz, points, self.use_xyz)
207 else:
208 new_xyz, new_points, idx, grouped_xyz = sample_and_group(xyz, points, self.npoint, self.nsample, self.radius, self.use_xyz)
209
210 new_points = self.mlp_conv(new_points)
211 new_points = torch.max(new_points, 3)[0]
212
213 return new_xyz, new_points
214
215
216class PointNet_FP_Module(nn.Module):

Callers

nothing calls this directly

Calls 2

sample_and_group_allFunction · 0.85
sample_and_groupFunction · 0.85

Tested by

no test coverage detected