-
Notifications
You must be signed in to change notification settings - Fork 1.5k
iter_patch_slices Patch Order #4287
Copy link
Copy link
Closed
Description
Similar to convolutions, the way usually sliding window is implemented is going over the slow dimension first and then go down the other indices (sweeping row by row), like this:
A = [[ a, a, b, b],
[ a, a, b, b],
[ c, c, d, d],
[ c, c, d, d]]
L = [[[a,a],[a,a]],[[b,b],[b,b]], [[c,c],[c,c]], [[d,d],[d,d]]However, in iter_patch_slices, this behavior is intentionally reversed:
Lines 148 to 149 in cd77e91
| for position in product(*ranges[::-1]): # reverse ranges order to iterate in index order | |
| yield tuple(slice(s, s + p) for s, p in zip(position[::-1], patch_size_)) |
Is there any reason for that? Can we stick to the more common convention?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels