Skip to content

Commit 5ab2284

Browse files
author
Cindy Chiao
authored
allow equal stride and dimsize
The current assertion breaks if we want to get 1 sample per batch (where the input dims and output dims are identical). Changing < to <= to allow such cases.
1 parent 8c29bcf commit 5ab2284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xbatcher/generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _slices(dimsize, size, overlap=0):
1919
slices = []
2020
stride = size - overlap
2121
assert stride > 0
22-
assert stride < dimsize
22+
assert stride <= dimsize
2323
for start in range(0, dimsize, stride):
2424
end = start + size
2525
if end <= dimsize:

0 commit comments

Comments
 (0)