(self, feats, coords)
| 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) |