MCPcopy
hub / github.com/TencentARC/Pixal3D / __cal_shape

Method __cal_shape

pixal3d/modules/sparse/basic.py:461–465  ·  view source on GitHub ↗
(self, feats, coords)

Source from the content-addressed store, hash-verified

459 return len(self.layout)
460
461 def __cal_shape(self, feats, coords):
462 shape = []
463 shape.append(coords[:, 0].max().item() + 1)
464 shape.extend([*feats.shape[1:]])
465 return torch.Size(shape)
466
467 def __cal_layout(self, coords, batch_size):
468 seq_len = torch.bincount(coords[:, 0], minlength=batch_size)

Callers 2

__init__Method · 0.95
shapeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected