(size: int, device)
| 149 | return padded_sequences |
| 150 | |
| 151 | def get_range_vector(size: int, device) -> torch.Tensor: |
| 152 | """ |
| 153 | """ |
| 154 | return torch.arange(0, size, dtype=torch.long).to(device) |
| 155 | |
| 156 | def flatten_and_batch_shift_indices(indices: torch.LongTensor, |
| 157 | sequence_length: int) -> torch.Tensor: |
no test coverage detected