Remove license and ignore rules

This commit is contained in:
xmarre
2026-04-07 22:29:53 +02:00
parent 3b1de916f2
commit ff0c680d60
+5 -3
View File
@@ -53,9 +53,11 @@ def _repeat_and_slice_batch_tensor(value: torch.Tensor, start: int, end: int, fu
if value.shape[0] == 1:
return value
if value.shape[0] < full_batch_size:
reps = (math.ceil(full_batch_size / value.shape[0]),) + ((1,) * (value.ndim - 1))
expanded = value.repeat(reps)[:full_batch_size]
return expanded[start:end]
window_len = end - start
offset = start % value.shape[0]
reps = (math.ceil((offset + window_len) / value.shape[0]),) + ((1,) * (value.ndim - 1))
expanded = value.repeat(reps)
return expanded[offset:offset + window_len]
return value[start:end]