MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / get_range_vector

Function get_range_vector

relogic/logickit/utils/utils.py:151–154  ·  view source on GitHub ↗

(size: int, device)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

toMethod · 0.45

Tested by

no test coverage detected