MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / forward

Method forward

pointops/functions/pointops.py:345–366  ·  view source on GitHub ↗

:param ctx: :param radius: :param nsample: :param xyz: (b, n, 3) :param new_xyz: (b, m, 3) :param label_stat: (b, n, nclass) :return: new_label_stat: (b, m, nclass) idx: (b, m, nsample)

(ctx, radius: float, nsample: int, xyz: torch.Tensor, new_xyz: torch.Tensor, label_stat: torch.Tensor)

Source from the content-addressed store, hash-verified

343class LabelStatAndBallQuery(Function):
344 @staticmethod
345 def forward(ctx, radius: float, nsample: int, xyz: torch.Tensor, new_xyz: torch.Tensor, label_stat: torch.Tensor):
346 '''
347 :param ctx:
348 :param radius:
349 :param nsample:
350 :param xyz: (b, n, 3)
351 :param new_xyz: (b, m, 3)
352 :param label_stat: (b, n, nclass)
353 :return: new_label_stat: (b, m, nclass) idx: (b, m, nsample)
354 '''
355 assert xyz.is_contiguous()
356 assert new_xyz.is_contiguous()
357 assert label_stat.is_contiguous()
358
359 b, n, nclass = label_stat.size()
360 m = new_xyz.size(1)
361 new_label_stat = torch.cuda.IntTensor(b, m, nclass).zero_()
362 idx = torch.cuda.IntTensor(b, m, nsample).zero_()
363
364 pointops_cuda.labelstat_and_ballquery_cuda(b, n, m, radius, nsample, nclass, new_xyz, xyz, label_stat, idx, new_label_stat)
365
366 return new_label_stat, idx
367
368 @staticmethod
369 def backward(ctx, a=None, b=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected