Skip to content

Commit 3fab839

Browse files
fix torch sliding_window pad
1 parent 2d484aa commit 3fab839

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎utils3d/torch/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def sliding_window(
9090
else:
9191
raise ValueError(f"Invalid pad_size {pad_size}")
9292
full_pad = [(0, 0) if i not in dim else pad_size[dim.index(i)] for i in range(x.ndim)]
93-
full_pad = chain(*reversed(full_pad))
93+
full_pad = tuple(chain(*reversed(full_pad)))
9494
x = F.pad(x, full_pad, mode=pad_mode, value=pad_value)
9595

9696
for i in range(len(window_size)):

0 commit comments

Comments
 (0)