MCPcopy Index your code
hub / github.com/microsoft/TRELLIS / __cal_shape

Method __cal_shape

trellis/modules/sparse/basic.py:117–121  ·  view source on GitHub ↗
(self, feats, coords)

Source from the content-addressed store, hash-verified

115 raise e
116
117 def __cal_shape(self, feats, coords):
118 shape = []
119 shape.append(coords[:, 0].max().item() + 1)
120 shape.extend([*feats.shape[1:]])
121 return torch.Size(shape)
122
123 def __cal_layout(self, coords, batch_size):
124 seq_len = torch.bincount(coords[:, 0], minlength=batch_size)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected